AS 7 datasource using MSSQL (SQL Server)
drollins Jul 27, 2011 2:26 PMI am trying to move from JBoss 6 to JBoss 7 and am running into a few difficulties. At the moment I'm stopped with the datasource.
I have added the following to
standalone\configuration\standalone.xml
<datasource jndi-name="java:jdbc/myDB" enabled="true" use-java-context="true" pool-name="myDB"> <connection-url>jdbc:jtds:sqlserver://SERVER_NAME:1433/DB_NAME;loginTimeout=30</connection-url> <driver>JTDS</driver> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> <new-connection-sql>select 1</new-connection-sql> <security> <user-name>USER_NAME</user-name> <password>USER_PASSWORD</password> </security> <validation> <check-valid-connection-sql>select 1</check-valid-connection-sql> </validation> <timeout> <blocking-timeout-millis>5000</blocking-timeout-millis> <idle-timeout-minutes>15</idle-timeout-minutes> <set-tx-query-timeout/> </timeout> <pool> <min-pool-size>5</min-pool-size> <max-pool-size>50</max-pool-size> </pool> <statement> <track-statements>false</track-statements> </statement> </datasource>
and to the drivers section I've added
<driver name="JTDS" module="net.sourceforge.jtds"> <driver-class>net.sourceforge.jtds.jdbcx.JtdsDataSource</driver-class> </driver>
When I deploy I get the following error:
13:23:05,789 INFO [org.jboss.as.controller] (Controller Boot Thread) Service status report
New missing/unsatisfied dependencies:
service jboss.jdbc-driver.JTDS (missing)
I added the following module.xml
net\sourceforge\jtds
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="net.sourceforge.jtds"> <resources> <resource-root path="jtds-1.2.5.jar"/> <!-- Insert resources here --> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>