sql server - XA Datasource in Microsoft JDBC driver and jTDS JDBC Driver -


i'm little new sql server, , working in java application connecting it. found these 2 well-known jdbc drivers, microsoft 1 , jtds one. i'm trying use xa datasource.

according microsoft documentation, here says have configure server, before using xa datasource. according doc, asks enable xa in server.

but don't see such server-side modification required jtds. (i couldn't find doc saying so, here)

so, question how jtds manage enable xa in server, while microsoft 1 needs me enabling task?

or missing here?

found answer after digging in jtds driver distribution. has readme.xa file saying all. copying content below.

xa support in jtds ==================  version of jtds includes xadatasource class allows driver used j2ee servers support xa jdbc connections. class name net.sourceforge.jtds.jdbcx.jtdsdatasource.  default driver emulate distributed transactions fooling j2ee environment believing 2 phase commit supported. emulation has serious drawback when used in true distributed environment, driver may not able commit or rollback when requested transaction manager. in situation data loss or corruption can occur.  in general emulation safe use when jtds transactional resource manager or database read , never updated. emulation faster support true distributed transactions , may reason consider using driver in mode if risks understood.  many j2ee servers provide own xa emulations allow normal net.sourceforge.jtds.jdbc.driver used. recommendation use vendor's emulation, if available, rather xadatasource configuration more stable.  driver support true distributed transactions ms sql2000 provided extended stored procedure in jtdsxa.dll installed in target server. disable xa emulation , use stored procedure, set connection property "xaemulation" "false". implementation immature , cannot recommended production use @ stage. may useful development when true 2 phase commit support required.  connection property, "logfile" has been added jtdsdatasource allows jtds logging enabled in j2ee environment. parameter value specifies output file path logging information.  2 example configurations popular jboss server included in conf directory. 1 configuration uses driver interface , server's xa emulation other shows how use driver's xa support in either emulated or real mode.   installing jtdsxa.dll =====================  true distributed transaction support jtdsxa.dll has installed on server. installation procedure consists of 2 simple steps:   1. copy jtdsxa.dll xa directory <sql_server_root>/binn     directory of sql server installation.   2. command prompt run following command in directory     extracted jtds:      isql -usa -p<sa_password> -s<server_name_or_ip> -ixa\instjtds.sql      alternatively, use db tool (such query analyzer or jdbc tool)     execute script within 'master' database. don't forget log in     'sa'.  install xp_jtdsxa extended stored procedure, used jtds provide true distributed transacition support. 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -