0 Replies Latest reply on Nov 4, 2003 9:41 AM by norrin88

    Already associated with a tx

    norrin88 Newbie

      Hello. I'm getting this exception in a stateful session bean, which is frequently accessing another entity bean. As you can see, my app isn't really very complex, but I can't get it working.

      The weird thing is that, when there are few instances of the accessed entity bean (of course conveniently stored in the database -MySQL-) my app works properly. But whenever the input data set (and so, the instances stored in the database) is above a not-exaggerated threshold (let's say 500 kb of plain text data, and about 5000 instances of the entity bean) there is an instant when a I get this exception:

      RuntimeException:
      java.lang.IllegalStateException: Already associated with a tx
      at org.jboss.tm.TxManager.resume(TxManager.java:212)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:371)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:490)
      at org.jboss.ejb.Container.invoke(Container.java:700)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)

      Then the client abort and jboss starts passivating beans...

      I don't have idea of what's going on. Maybe the transactions internally managed (?) by jboss are too long... (TransactionTimeout has been increased to prevent rollbacks)

      This is too frustrating... please help me!

      Thanks for any reply.