You can clone with
Cannot retrieve contributors at this time
XA support in jTDS==================This version of jTDS includes a XADataSource class which allows the driver tobe used with J2EE servers that only support XA JDBC connections. The class nameis net.sourceforge.jtds.jdbcx.JtdsDataSource.By default the driver will emulate distributed transactions fooling the J2EEenvironment into believing that two phase commit is supported. This emulationhas the serious drawback that when used in a true distributed environment, thedriver may not be able to commit or rollback when requested by the transactionmanager. In this situation data loss or corruption can occur.In general this emulation is safe to use when jTDS is the only transactionalresource manager or where the database is read only and never updated.Emulation is much faster than support for true distributed transactions andthis may be another reason to consider using the driver in this mode if therisks are understood.Many J2EE servers provide their own XA emulations that allow the normalnet.sourceforge.jtds.jdbc.Driver to be used. The recommendation is to use thevendor's emulation, if available, rather than the XADataSource as thisconfiguration is likely to be more stable.The driver will support true distributed transactions with MS SQL2000 providedthat the extended stored procedure in JtdsXA.dll is installed in the targetserver. To disable the XA emulation and use the stored procedure, set theconnection property "xaemulation" to "false". This implementation is veryimmature and cannot be recommended for production use at this stage. It mayhowever be useful for development when true two phase commit support isrequired.Another connection property, "LogFile" has been added to JtdsDataSource whichallows the jTDS logging to be enabled in a J2EE environment. The parametervalue specifies the output file path for the logging information.Two example configurations for the popular JBoss server are included in theconf directory. One configuration uses the Driver interface and the server's XAemulation the other shows how to use the driver's XA support in either emulatedor real mode.Installing JtdsXA.dll=====================For true distributed transaction support JtdsXA.dll has to be installed on theserver. The installation procedure consists of two simple steps: 1. Copy JtdsXA.dll from the XA directory to the <SQL_Server_Root>/binn directory of the SQL Server installation. 2. From the command prompt run the following command in the directory where you extracted jTDS: isql -Usa -P<sa_password> -S<server_name_or_ip> -iXA\instjtds.sql Alternatively, use any DB tool (such as Query Analyzer or any JDBC tool) to execute the script within the 'master' database. Don't forget to log in as 'sa'.This will install the xp_jtdsxa extended stored procedure, used by jTDS toprovide true distributed transacition support.