[jboss-dev-forums] [Design of JCA on JBoss] - XAExpectionUnitTestCase Failures/JBossTS/JBoss 4.2

weston.price@jboss.com do-not-reply at jboss.com
Thu Jan 25 14:45:34 EST 2007


In one of our unit tests


  | org.jboss.test.jca.test.XAExceptionUnitTestCase
  | 

we have two tests that simulate errors when a JCA resource is used in an EJB. One is a resource exception, the other a runtime exception. Both occur in the matchManagedConnections() method of of the TestManagedConnectionFactory. Being that an error/excpetion occurs, the underlying connection is destroyed prior to use; no problems here. Howerver, in one test the transaction is rolled back at the end of the in the finally block. Because the 


  | <track-by-transaction>
  | 

flag is set to false when JBossTS attempts any sort of activity on the underlying resource it fails because the resource has already been destroyed. JBossTM seemed to either mask this condition, or just ignore it all together whileJBossTS reports a failure which is causing an ERROR in the tests. From what I understand, it seems that the 


  | <track-by-transaction>
  | 

flag should really be true by default for XA connections(we already do this for local resources). I can't envision why this shouldn't be set as the default moving forward with the new transaction manager stuff. In fact, most JDBC based resources from the big RDBMS vendors (Oracle, DB2) and some of the open source guys (Postgres most notably but for other reasons) already require this. 








View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006507#4006507

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006507



More information about the jboss-dev-forums mailing list