Philippe,

OK. I set the trace levels you suggested and that identified the problem. The
transaction within which the compound entity bean is loaded (and all its
aggregated beans) was timing out.  I was already trying to prevent this happening
by performing the load within a client-demarcated transaction with a long
timeout. But it looks like the timeout set on the client-demarcated transaction
is not having any effect. When I set a long timeout in jonas.tm.timeout, the
compound bean loads fine.

So there would be seem to be at least these possibilities:
a) I don't understand EJB transactions properly.
b) client-demarcated transactions are not working properly with 2.2.4.
c) the value in jonas.tm.timeout is overriding the timeout set on the
client-demaracted transaction.

It would be nice to be able to set a long timeout from the client, and use a
shorter value for jonas.tm.timeout. I didn't have any problems like this in
2.1.1, which makes me suspect there's a problem with 2.2.4.

I attach the trace as a .txt file. If you look near the top you'll see
"TransactionImpl.timeoutExpired(Object arg)".

Regards,
Joe

Philippe Durieux wrote:

> Joe Gittings wrote:
> >
> > Hi,
> >
> > First, many thanks to the Jonas team for sorting out the memory leakage
> > problem so quickly.
> >
> > I'm upgrading to 2.2.4 right now. Everything seems to work fine, except
> > that when I load one of my beans (a large, compound bean), I'm getting a
> > whole load of "Cannot enlist
> > XAResource:javax.transaction.RollbackException" errors. I wasn't getting
> > these with 2.1.1. And I haven't changed any code or the deployment
> > descriptors since I used 2.1.1 (although I have of course redeployed under
> > 2.2.4). The compound bean does actually load ok, however it's not really
> > acceptable to have all these stack traces being dumped to stderr each time.
> >
> > There are lots of these errors when I load up one compound object. The
> > errors relate to calls made during the loading process on EJBs that the
> > compound bean loads up. Specifically, I'm loading a TaxonFacade EJB, during
> > which a number of BibliographyEntry EJBs are loaded, and setReadOnly is
> > called on each BibliographyEntryEJB. The first error looks like this:
> >
> > XAResource ---> rollback: XA START without XA END
>
> I'm looking at this problem, but I cannot figure out where does this
> rollback
> comes from ? Do you rollback a transaction during the ejbLoad process
> ???
> Probably it would be interesting to have some traces set to see who
> actually
> calls this rollback without respecting the XA protocol since we have a
> XA END missing... I guess this error is inside jonas and that we did not
> get
> it earlier because we do not often use compound beans with Bean Managed
> Persistence,
> but I'm not sure.
> If you can provide me with more information, for example setting the
> trace levels
> for jonas container (JonasAdmin -t 31,1,5,14,17,21) and sending me the
> trace messages just before the rollback, it would be great.
>
> > Cannot enlist XAResource:javax.transaction.RollbackException
> > Connection will not be enlisted in a transaction
> >  getICtx IT: registerSynchronization:
> > javax.transaction.RollbackException
> >         at
> > org.objectweb.jonas_tm.SubCoordinator.addSynchronization(SubCoordinat
> > or.java:352)
> >         at
> > org.objectweb.jonas_tm.TransactionImpl.registerSynchronization(Transa
> > ctionImpl.java:340)
> >         at
> > org.objectweb.jonas_ejb.container.ContextSwitch.getICtx(ContextSwitch
> > .java:171)
> >         at
> > org.objectweb.jonas_ejb.container.JBeanEntity.getContext(JBeanEntity.
> > java:149)
> >         at
> > org.objectweb.jonas_ejb.container.JBeanEntity.preinvoke(JBeanEntity.j
> > ava:276)
> >         at
> > uk.org.rbgkew.sepasal.ejb.data.dictionaryrecord.JOnASBibliographyEntr
> > yRemote.setReadOnly(generated\uk\org\rbgkew\sepasal\ejb\data\dictionaryr
> > ecord\JO
> > nASBibliographyEntryRemote.java:544)
> >         at uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeBean.loadAndS
> > ortRefer
> > encedBibliographyEntries(TaxonFacadeBean.java:340)
> >         at
> > uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeBean.ejbLoad_Inner(Ta
> > xonFacadeBean.java:209)
> >         at
> > uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeBean.ejbLoad(TaxonFac
> > adeBean.java:142)
> >         at
> > org.objectweb.jonas_ejb.container.EntityContextImpl.activate(EntityCo
> > ntextImpl.java:352)
> >         at
> > org.objectweb.jonas_ejb.container.ContextSwitch.getICtx(ContextSwitch
> > .java:177)
> >         at
> > org.objectweb.jonas_ejb.container.JBeanEntity.getContext(JBeanEntity.
> > java:149)
> >         at
> > org.objectweb.jonas_ejb.container.JBeanEntity.preinvoke(JBeanEntity.j
> > ava:276)
> >         at
> > uk.org.rbgkew.sepasal.ejb.data.taxon.JOnASTaxonFacadeRemote.getImplem
> > entation(generated\uk\org\rbgkew\sepasal\ejb\data\taxon\JOnASTaxonFacade
> > Remote.j
> > ava:43)
> >         at
> > uk.org.rbgkew.sepasal.ejb.data.taxon.JOnASTaxonFacadeRemote_Skel.send
> > (generated\uk\org\rbgkew\sepasal\ejb\data\taxon\JOnASTaxonFacadeRemote_S
> > kel.java
> > :64)
> >         at
> > org.objectweb.david.libs.protocols.giop.GIOPProtocol$ServerSession_Lo
> > w.send(GIOPProtocol.java:620)
> >
> > Any ideas what the problem is?
> > Joe
> >
> > =====================================================================
> > Joe Gittings, Royal Botanic Gardens, Kew
> > Hanover House, Kew, Richmond, Surrey TW9 3AB
> >
> > [EMAIL PROTECTED]
> > +44 20 8332 5712
> > fax: +44 20 8332 5736
> >
> > The SEPASAL database is now live at http://www.rbgkew.org.uk/ceb/sepasal/
> >
> > ----
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body of the message "unsubscribe jonas-users".
> > For general help, send email to [EMAIL PROTECTED] and
> > include in the body of the message "help".
>
> --
> Philippe Durieux  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Bull - 1 rue de Provence - 38432 Echirolles Cedex France
> [EMAIL PROTECTED]
> -> Download our EJBServer at http://www.evidian.com/ejb <-
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity: getContextFromPool
 JBeanHome.fromThePool: EmptyStack
 TransactionImpl.registerSynchronization(Synchronization sync)
 SubCoordinator.addSynchronization(Synchronization synchro)
 TransactionImpl.timeoutExpired(Object arg)
 SubCoordinator.rollback()
 TransactionImpl.enlistResource(XAResource xares)
 SubCoordinator.addResource(XAResource xares)
 SubCoordinator.doBeforeCompletion()
 TransactionImpl.delistResource()
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity: getContextFromPool
 JBeanHome.fromThePool: EmptyStack
 TransactionImpl.registerSynchronization(Synchronization sync)
 SubCoordinator.addSynchronization(Synchronization synchro)
 TransactionImpl.unsetTimer()
 SubCoordinator.doRollback()
 TransactionImpl.enlistResource(XAResource xares)
 SubCoordinator.addResource(XAResource xares)
Cannot enlist XAResource:javax.transaction.RollbackException
Connection will not be enlisted in a transaction
 TransactionImpl.delistResource()
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity: getContextFromPool
 JBeanHome.fromThePool: EmptyStack
 TransactionImpl.registerSynchronization(Synchronization sync)
 SubCoordinator.addSynchronization(Synchronization synchro)
 getICtx IT: registerSynchronization:
javax.transaction.RollbackException
        at org.objectweb.jonas_tm.SubCoordinator.addSynchronization(SubCoordinat
or.java:352)
        at org.objectweb.jonas_tm.TransactionImpl.registerSynchronization(Transa
ctionImpl.java:340)
        at org.objectweb.jonas_ejb.container.ContextSwitch.getICtx(ContextSwitch
.java:171)
        at org.objectweb.jonas_ejb.container.JBeanEntity.getContext(JBeanEntity.
java:149)
        at org.objectweb.jonas_ejb.container.JBeanEntity.preinvoke(JBeanEntity.j
ava:276)
        at uk.org.rbgkew.sepasal.ejb.data.taxondetail.use.JOnASUseGroupRemote.ge
tUTG12Key(generated\uk\org\rbgkew\sepasal\ejb\data\taxondetail\use\JOnASUseGroup
Remote.java:64)
        at uk.org.rbgkew.sepasal.ejb.data.taxondetail.use.TaxonUseBean.ejbFindBy
Taxon_Inner(TaxonUseBean.java:247)
        at uk.org.rbgkew.sepasal.ejb.data.taxondetail.use.TaxonUseBean.ejbFindBy
Taxon(TaxonUseBean.java:223)
        at uk.org.rbgkew.sepasal.ejb.data.taxondetail.use.JOnASTaxonUseHome.find
ByTaxon(generated\uk\org\rbgkew\sepasal\ejb\data\taxondetail\use\JOnASTaxonUseHo
me.java:105)
        at uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeBean.getTaxonDetailsA
ndRefs(TaxonFacadeBean.java:374)
        at uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeBean.ejbLoad_Inner(Ta
xonFacadeBean.java:174)
        at uk.org.rbgkew.sepasal.ejb.data.taxon.TaxonFacadeBean.ejbLoad(TaxonFac
adeBean.java:142)
        at org.objectweb.jonas_ejb.container.EntityContextImpl.activate(EntityCo
ntextImpl.java:352)
        at org.objectweb.jonas_ejb.container.ContextSwitch.getICtx(ContextSwitch
.java:177)
        at org.objectweb.jonas_ejb.container.JBeanEntity.getContext(JBeanEntity.
java:149)
        at org.objectweb.jonas_ejb.container.JBeanEntity.preinvoke(JBeanEntity.j
ava:276)
        at uk.org.rbgkew.sepasal.ejb.data.taxon.JOnASTaxonFacadeRemote.getImplem
entation(generated\uk\org\rbgkew\sepasal\ejb\data\taxon\JOnASTaxonFacadeRemote.j
ava:43)
        at uk.org.rbgkew.sepasal.ejb.data.taxon.JOnASTaxonFacadeRemote_Skel.send
(generated\uk\org\rbgkew\sepasal\ejb\data\taxon\JOnASTaxonFacadeRemote_Skel.java
:64)
        at org.objectweb.david.libs.protocols.giop.GIOPProtocol$ServerSession_Lo
w.send(GIOPProtocol.java:620)
        at org.objectweb.jonathan.libs.protocols.tcpip.TcpIpProtocol$Session.run
(TcpIpProtocol.java:396)
        at org.objectweb.jonathan.libs.resources.JScheduler$JJob.run(JScheduler.
java:265)
 SubCoordinator.doAfterCompletion()
 JBeanEntity.releaseContext
 TransactionImpl.enlistResource(XAResource xares)
 SubCoordinator.addResource(XAResource xares)
Cannot enlist XAResource:javax.transaction.RollbackException
Connection will not be enlisted in a transaction
 TransactionImpl.delistResource()
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity.postinvoke
 doPostInvoke
 JBeanEntity.preinvoke
 JContainerImpl.checkTransactionIn
 Transaction Attribute = TX_REQUIRED
 JBeanEntity.getContext: 1002210097567747
 getICtx IT
 JBeanEntity: getContextFromPool
 JBeanHome.fromThePool: EmptyStack
 TransactionImpl.registerSynchronization(Synchronization sync)
 SubCoordinator.addSynchronization(Synchronization synchro)
 getICtx IT: registerSynchronization:
javax.transaction.RollbackException
        at org.objectweb.jonas_tm.SubCoordinator.addSynchronization(SubCoordinat
or.java:352)
        at org.objectweb.jonas_tm.TransactionImpl.registerSynchronization(Transa
ctionImpl.java:340)
        at org.objectweb.jonas_ejb.container.ContextSwitch.getICtx(ContextSwitch




Reply via email to