From: Andy J. (JIRA) <web...@jp...> - 2007-05-08 10:06:48
|
[ http://www.jpox.org/servlet/jira/browse/CORE-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_13967 ] Andy Jefferson commented on CORE-2734: -------------------------------------- Comment from Guido originally raised as CORE-3255 Current implementation of isActive() is: public boolean isActive() { boolean isActive = super.isActive(); if( isActive ) { //do not join transaction if org.jpox.Transaction already started return true; } joinTransaction(); return isActive; } The following fragment causes a org.jpox.jdo.exceptions.TransactionNotActiveException on makePersistent() call PersistenceManager pm = pmf.getPersistenceManager(); ut.setTransactionTimeout(300); ut.begin(); Product product = new Product("Sony Discman", "A standard discman from Sony", 200.00); pm.makePersistent(product); Using the debugger it is clear that if boolean isActive = super.isActive(); returns false, the active JTA transaction is correctly joined with the call to joinTransaction(); that correctly toggles active flag to true in the superclass. unfortunately local method variable isActive is not updated so the result is still false. > Use of JPOX with JTA using JNDI without requiring JCA > ----------------------------------------------------- > > Key: CORE-2734 > URL: http://www.jpox.org/servlet/jira/browse/CORE-2734 > Project: Core > Issue Type: New Feature > Components: Transactions > Affects Versions: 1.1.0-rc-1 > Reporter: Joerg von Frantzius > Assigned To: Joerg von Frantzius > Fix For: 1.2.0-beta-3 > > Attachments: jpox-jta.zip > > > J2EE-integration using the JCA adapter has some drawbacks: > - a large codebase to be maintained, > - buggy or restricted when used in JBOSS (http://www.jpox.org/servlet/forum/viewthread?thread=3000) > An alternative approach is to use the applications server's TransactionManager directly, see http://www.jpox.org/servlet/forum/viewthread?thread=3000 . > A first implementation (JtaSyncedTransaction) proves to be working in JBOSS when used in code without SessionBeans. Such code must pool/cache PersistenceManager instances by itself, something that is undesirable for SessionBeans. > For use with SessionBeans, please see a follow-up JIRA issue on this subject. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.jpox.org/servlet/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |