Java Mailing List Archive

http://www.junlu.com/

Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
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".

©2008 junlu.com - Jax Systems, LLC, U.S.A.