When configuring an iNet Merlia driver for an MSSQL data source with JBoss, you need to manually identify the correct driver for each data source. During deployment, JBoss creates two different drivers for Merlia, based on the name of the JAR file, the iNet driver class names and the version of the driver. To register your data source, you must provide the JBoss internal driver name:
Start JBoss server and deploy the driver (the
Merlia.jar.dodeploy
driver is deployed automatically when the server starts).Open the JBoss Management Console at
http://
server-name
:
port
and then clicking on Management Console.Select Profile > Datasources
Select Add to add a new data source.
Enter a data source name and a JNDI name.
Select Next. JBoss displays the option to choose a driver for the data source and displays a list of installed drivers. Note that there are two
Merlia.jar
drivers, which differ based on the class type and version of the driver..com.inet.tds.TdsDataSource
- The JDBC 1 data source , a simple data source..com.inet.tds.PDataSource
– A pooled data source.
Identify the appropriate driver name to add to the server’s configuration file.
Once you have retrieved the driver, open the server’s configuration file and enter the driver information. For example:
<xa-datasource enabled="true" jndi-name="java:/ATGProductionDS" pool-name="ATGProductionDS" use-java-context="true"> <xa-datasource-property name="ServerName">localhost</xa-datasource-property> <xa-datasource-property name="DatabaseName">prod</xa-datasource-property> <xa-datasource-property name="User">sa</xa-datasource-property> <xa-datasource-property name="Password">password</xa-datasource-property> <xa-datasource-property name="Mode">71</xa-datasource-property> <xa-datasource-class>com.inet.tds.DTCDataSource</xa-datasource-class> <new-connection-sql>select 1</new-connection-sql> <driver>Merlia.jarcom.inet.tds.TdsDriver_8_0</driver> <security> <user-name>sa</user-name> <password>NB129T</password> </security> <xa-pool> <min-pool-size>5</min-pool-size> <max-pool-size>100</max-pool-size> <is-same-rm-override>false</is-same-rm-override> </xa-pool> <timeout> <blocking-timeout-millis>5000</blocking-timeout-millis> <idle-timeout-minutes>15</idle-timeout-minutes> </timeout> <validation> <exception-sorter class-name="org.jboss.resource.adapter.jdbc. vendor.DB2ExceptionSorter"/> <!-- sql to call on an existing pooled connection when it is obtained from pool --> <check-valid-connection-sql>select 1</check-valid-connection-sql> </validation> <!-- To avoid deadlocks you need set this --> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> </xa-datasource>