[jboss-user] [Datasource Configuration]MIgration from Jboss 3.2 -> 4.2 FAILURE -> JMX/JNDI Transactions fail when EJBs Involved

Stephen Davidson gorky at freenet.carleton.ca
Mon Nov 26 10:11:30 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greetings.

Forgot the scenario for this issue(sorry);
1) Transaction starts.
2) Attempt is made to get a handle to the Connection pool, which has not
yet been created (for reasons that will become clear momentarily,
Connections are NOT defined using *ds-xml files)
3) Connection information is retrieved from Database using 'bootstrap'
connection pool.  Connection Info is stored in Database due to
non-trivial numbers of Databases & Schemas to connect to -- its not
practical to set them up use *-ds.xml files (too many).
4) Connection Pool to appropriate Database Schema is created with
retrieved Connection Info, using JBoss MBeans.
5) New DataSource is retrieved.
6) Connection is retrieved from new DataSource.
7) EJB(s) execute operations on using new Connection.
8) Transaction finishes.

Unfortunately, under JBoss 4.2, step #6 fails, as apparently at least
two of the MBeans involved in step 4 do not support the 2-phase commit
that new Transaction Manager requires.  Which also brings up the
question, what happens if something in step 7 fails?  (Note: I can live
with the Connection Pool being closed down as part of the rollback,
actually that might be the best outcome for the situation in question).

Regards,
Steve

Stephen Davidson wrote:
> Greetings.
> 
> (Sorry for the resend -- sent from the wrong account originally, which
> seems to have failed).
> 
> I have been told that it is proper behaviour that any attempt to create
> and register a DataSource, using the JBoss DataSource and related
> classes, from inside an EJB transaction fail.  From what I've been able
> to determine so far, there is are least two MBean calls that are not
> supportable by or do not support 2-Phase commit, which the new
> Transaction Manager in 4.2 requires.
> 
> Using the JBoss Classes in this is causing failures in 4.2, but worked
> in 3.0/3.2.  This is currently being MISIDENTIFIED as a
> Specification/Configuration Issue.  As I just mentioned, it appears to
> be an issue with JBoss MBean/Transaction Manager interactions.
> 
> See for details, stack traces, logs, etc;
> http://jira.jboss.com/jira/browse/JBAS-4998
> http://jira.jboss.com/jira/browse/JBAS-5001
> 
> This is causing my Migration from JBoss 3.2 -> 4.2 to fail.  I thought
> that the way I opened the Second JIRA, it was clear that there was an
> JBoss MBean/Transaction Manager incompatibility somewhere (obviously was
> NOT clear!)
> 
> The Workarounds I have been given are flagged as 'Dangerous'.  Is there
> ANY way for the appropriate JBoss JMX Classes to be upgraded, so that
> they work for the 2-Phase Transaction Manager , and can be called from
> inside an EJB with active transactions???  As it is, the calls to the
> MBeans are either failing, or I have to set
> 'AllowMultipleLastResource=True", which is a 'Dangerous Solution'.
> (I don't know enough about the Transaction Manager or the MBeans
> involved to do fix this myself, and under a deadline tight enough that
> makes sitting down inside an unknown code base not a good idea).
> 
> Sorry about being a little repetitive, but this is blocking migration of
> a major project from JBoss 3.2, and other than being told to set a
> 'dangerous' configuration option, I've not been able to get any
> assistance yet on this matter.
> 
> -Steve
_______________________________________________
jboss-user mailing list
jboss-user at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHSuIiPtiPEDq7o8YRAv+CAKCdpfk7thDqDFOhqmLABrq3eAFXjwCdFRIh
+26Jc4lqJrbwAn8ZqVEj9/o=
=AblW
-----END PGP SIGNATURE-----



More information about the jboss-user mailing list