<datasources> <local-tx-datasource> <!-- remove this depends tag if you are not using the tcp connection url --> <depends>jboss:service=Hypersonic</depends> <jndi-name>DefaultDS</jndi-name> <!-- for tcp connection, allowing other PRocesses to use the hsqldb database --> <connection-url>jdbc:hsqldb:hsql://localhost:1701</connection-url> ------------------》这一行要设置 <!-- for totally in-memory db, not saved when jboss stops. hsql mbean is unnecessary--> <!--connection-url>jdbc:hsqldb:.</connection-url--> <!-- for in-process db, saved when jboss stops. hsql mbean is unnecessary--> <!--connection-url>jdbc:hsqldb:default-db-name</connection-url--> <driver-class>org.hsqldb.jdbcDriver</driver-class> ------------------》这一行要设置 <user-name>sa</user-name> ------------------》这一行要设置 <passWord></password> ------------------》这一行要设置 <!--example of how to specify class that determines if exception means connection should be destroyed-->
<!-- this mbean should be used only when using tcp connections --> <mbean code="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic"> <attribute name="Port">1701</attribute> ------------------》这一行要设置 <attribute name="Silent">true</attribute> <attribute name="Database">default</attribute> <attribute name="Trace">false</attribute> <attribute name="No_system_exit">true</attribute> </mbean> </datasources>
<datasources> <local-tx-datasource> <!-- remove this depends tag if you are not using the tcp connection url --> <depends>jboss:service=Hypersonic</depends> <jndi-name>DefaultDS</jndi-name> <!-- for tcp connection, allowing other processes to use the hsqldb database --> <connection-url>jdbc:microsoft:sqlserver://192.168.0.221:1433;DatabaseName=mydb;SelectMethod=cursor</connection-url> <!-- for totally in-memory db, not saved when jboss stops. hsql mbean is unnecessary--> <!--connection-url>jdbc:hsqldb:.</connection-url--> <!-- for in-process db, saved when jboss stops. hsql mbean is unnecessary--> <!--connection-url>jdbc:hsqldb:default-db-name</connection-url--> <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class> <user-name>sa</user-name> <password>sa</password> <!--example of how to specify class that determines if exception means connection should be destroyed-->
<!-- this mbean should be used only when using tcp connections --> <mbean code="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic"> <attribute name="Port">1433</attribute> <attribute name="Silent">true</attribute> <attribute name="Database">default</attribute> <attribute name="Trace">false</attribute> <attribute name="No_system_exit">true</attribute> </mbean> </datasources>