  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | A problem with enlisting XA resources in SunONE8PE | A problem with enlisting XA resources in SunONE8PE 2004-08-20 - By Frank Kieviet
Back I'm running into a problem with an XA JCA connector where the transaction manager in the J2EE 1.4 Reference Implementation (SunONE8PE) enlists this XA resource multiple times.
The scenario is as follows: - A JMS message is received through an XA JCA connector - The message is delivered to an MDB - The MDB creates a stateful session bean - The stateful session bean creates a JMS connection using the same XA JCA connector - In the second method call on the stateful session bean, the XA JCA connector throws an exception
The exception is: "cannot call start(TMJOIN) immediately after end(TMSUCCESS) is called".
I did some debugging and found out the following: - every time a method call is made on the stateful session bean, the XA resource is enlisted. At the end of the call, the XA resource is delisted. - enlisting the XA resource will cause start(TMJOIN) to be called; delisting the XA resource will cause end(TMSUCCESS) to be called. - the XA resource requires that commit() or prepare()/commit() or prepare()/rollback() is called after end(TMSUCCESS) is called. Only THEN does the XA resource another call to start(TMJOIN) or start(TMNOFLAGS).
Additional problems I ran into: - after the exception is thrown, the application server closes the physical connection, but does not return the managed connection to the pool. Consequently the application server runs out of connections. - the exception does not cause a rollback of the transaction. Consequently, "message loss" occurs.
I'm wondering about the following: - Does anybody know if it is legal to call start(TMJOIN)/end(TMSUCCESS) repeatedly without a commit() or rollback() in between? - Does this problem exhibit itself only because a stateful session bean is used from the MDB? Is this not legal? - Is the problem about the transaction not being rolled back a known problem? Will it be fixed?
Any help would be greatly appreciated!
Frank
==========================================================================To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|
 |