Sybase XADataSource
michaellee Mar 2, 2004 9:15 PMI have just set up an XADataSource for ASE 12.5 using jConnect 5.5 on Jboss 3.0.6. Since it is not so straightforward, i would like to share it with anyone interested.
Following modification is required:
. ra.xml inside jboss-xa.rar
- for 3.0.6, there is a problem (seem to be a bug and should be fixed in later version) and following should be added inside any <config-property> tag.
<config-property-value></config-property-value>
sybase-xa-service.xml
. xa class : com.sybase.jdbc2.jdbc.SybXADataSource
. xa property : case sensitive and not follow java standard.
- databaseName not work and setter method not found
- only DatabaseName work. This may be a problem with 3.0.6 only
Actually, since my ASE don't have DTM enabled, error JZ0XS is reported. However, i think the configure is okay.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- ======================================================================-->
<!-- New ConnectionManager setup for Sybase ASE/ASA jConnect driver -->
<!-- Thanks to Marc Zampetti <zampetti@aol.net> -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- ===================================================================== -->
<!--classpath ARCHIVE="jconn2.jar" CODEBASE="../lib/" /-->
<!--FMS -->
<!--uncomment out this line if you are using the SybaseDSRealm above
SybaseDbRealm
-->
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
jdbc/SybaseFMS
<!-- Sybase jConnect URL for the database.
NOTE: The hostname and port of made up values. The optional
database name is provided, as well as some additinal Driver
parameters.
-->
<config-property name="XADataSourceProperties" type="java.lang.String">DatabaseName=FMS_DB;PortNumber=5000;ServerName=SB00NC.intrakmb.com.hk</config-property>
<config-property name="XADataSourceClass" type="java.lang.String">com.sybase.jdbc2.jdbc.SybXADataSource</config-property>
<config-property name="UserName" type="java.lang.String">DPCBLNHQ</config-property>
<config-property name="Password" type="java.lang.String">DPCBLNHQ</config-property>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Minerva JDBC XATransaction ResourceAdapter
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
2
10
5000
15
ByContainer
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager
java:/TransactionManager
<!--make the rar deploy! hack till better deployment-->
jboss.jca:service=RARDeployer