1 Reply Latest reply on Aug 10, 2007 10:01 AM by Adrian Brock

    SybXADataSource configuration

    Vladyslav Kosulin Newbie

      For those who are intrerested, here is a missing example of JBoss datasource config file main-ds.xml for Sybase jConnect XA driver SybXADataSource:

      <?xml version="1.0" encoding="UTF-8"?>

      <xa-datasource>
      <jndi-name>jdbc/main-ds</jndi-name>
      <track-connection-by-tx/>
      <xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>
      <xa-datasource-property name="NetworkProtocol">Tds</xa-datasource-property>
      <xa-datasource-property name="ServerName">myserver</xa-datasource-property>
      <xa-datasource-property name="PortNumber">4100</xa-datasource-property>
      <xa-datasource-property name="DatabaseName">mydatabase</xa-datasource-property>
      <!-- Use the security domain defined in conf/login-config.xml -->
      <security-domain>main-ds-encrypted</security-domain>
      <min-pool-size>1</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>15</idle-timeout-minutes>
      <check-valid-connection-sql>select 1 from mytable</check-valid-connection-sql>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>

      <type-mapping>Sybase</type-mapping>

      </xa-datasource>


      =========================
      And below is fragment of login-config.xml:
      <application-policy name = "main-ds-encrypted">

      <login-module code = "org.jboss.resource.security.SecureIdentityLoginModule"
      flag = "required">
      <module-option name = "username">mypassword</module-option>
      <module-option name = "password">myhash</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=jdbc/main-ds</module-option>
      </login-module>

      </application-policy>
      ===============================