配置一个mssql-service.xml或mssql-xa-service.xml(事务)就可以了,具体配置如下: <properties> <config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</config-property> <config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config-property> <!--set these only if you want only default logins, not through JAAS--> <config-property name="UserName" type="java.lang.String"></config-property> <config-property name="Password" type="java.lang.String"></config-property> </properties>
请赐教!
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=MyDatabase</config-property>
<config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config-property>
<!--set these only if you want only default logins, not through JAAS-->
<config-property name="UserName" type="java.lang.String"></config-property>
<config-property name="Password" type="java.lang.String"></config-property>
</properties>