<Resource id="DB2" type="DataSource">
jdbcDriver=com.ibm.db2.jcc.DB2Driver
XADataSource = com.ibm.db2.jcc.DB2XADataSource
jdbcurl=....
user=....
.....
</Resource>
<Resource id="H2" type="DataSource">
jdbcDriver=org.h2.Driver
XADataSource = org.h2.jdbcx.JdbcDataSource
jdbcurl=....
user=....
.....
</Resource>
openejb start....
warning:XADataSource not supported by "DB2"
program work fine below,but tansaction not valid! finally h2 update
sucessed,db2 error,should be both rollback!
usert.begin();
DataSource dx=(DataSource)ctx.lookup ("H2")
//XAConnection xa=dx.getXAConnection();
Connection con= dx.getConnection();
con.execute("update.h2_tbl..set ")....
DataSource dx=(DataSource)ctx.lookup ("DB2")
//XAConnection xa=dx.getXAConnection();
Connection con= dx.getConnection();
con.execute("update.db2_tbl..set ")....
user.commit();
.....................
user.rollback()
and
only connect h2 database and execute a sql ,mdb client may received info
from mdb
if connect db2 database and execute same a sql mdb client cannot received
info from mdb?
(sql operation all in mdb and sql execute successed! sql is a update
statement)
why?
--
View this message in context:
http://openejb.979440.n4.nabble.com/help-about-openejb-standalone-transaction-control-and-db2-for-mdb-tp4660396.html
Sent from the OpenEJB User mailing list archive at Nabble.com.