This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XA compliant DB Support

 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I've installed oracle XE and also the drivers and configure my connection pool(ping works well) and created a datasource . I tried to use the datasource from session bean but I get a oracle.jdbc.xa.OracleXAException.
It says "The resource manager is doing work outside a global transaction".Can someone please help on this, below is the session bean code oes Oracle XE support XA???


public void doTxn( ){

String sql = "INSERT INTO ITEM_ORDER (ID ) VALUES (50)";
try{
System.out.println(sql);
java.sql.Statement stmt = conn.createStatement();
stmt.execute(sql);
}catch(Exception e){ e.printStackTrace();}

Any help is greatly appriciated!
 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I gave up using oracle XE and created a Datasource for MYSQL using com.mysql.jdbc.jdbc2.optional.MysqlXADataSource and I am able to call java.sql.Connection.commit( ) or rollback from CMT ! and also the EJBContext.setRollbackonly has no effect ! It is a simple stateless session bean . I am really getting mad about working with tranasaction enclosing DB operations !
 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I figured out my problem . I wasnt using the innodb engine in mysql . Besides the java.sql.connection.commit throws runtime exception when used inside CMT!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic