Hello !

Again i have a problem with entity beans getting written 
to the database:

i have a entity bean with a very long running create-method
(up to 10 minutes). This bean is deployed with standard
container-configuration (i think commit option A) and
transaction-attribute required.
When calling this bean i haven't set up a transaction, expecting
the bean to do it on his own -
this works as long the create method doesn't last to long !

the bean with "shorter" create-method gets correctly written
to the db. The bean with "longer" create-method vanishes,
never to be seen again.

An experiment with an explicit ejbContext.getUserTransaction().commit()
at the end of the create method works with a short running
variant of the create-method, but with the long-running version
i get an :
java.rmi.ServerException: Container exception. Notify the container developers :-); 
nested exception is: 
        java.lang.IllegalStateException: No transaction.

full listing see below.

My questions are:
1. Is it generally not allowed to have
     a long running create-method ?
2. Is it generally not allowed to have 
     a commit at the end of a create-method ?
3. Why does it work with a shorter create-method
     and not with a longer one ?


thx in advance

-----
markus


Full StackTrace is here:

java.rmi.ServerException: Container exception. Notify the container developers :-); 
nested exception is: 
        java.lang.IllegalStateException: No transaction.
java.lang.IllegalStateException: No transaction.
        at org.jboss.tm.TransactionImpl.setRollbackOnly(TransactionImpl.java:148)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:270)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:126)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:143)
        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:191)
        at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:198)
        at $Proxy35.create(Unknown Source)
        at de.dig.vsa.stat.Statistikpool$StatCreateThread.run(Statistikpool.java:265)
        at de.dig.dfc.ThreadPoolManager$ServiceThread.run(ThreadPoolManager.java:273)

----------------------------------------------

immediately precding this is the following error:

Thread-38 12:03:10,735 ERROR ++ejb.statistic [ejbCreate] Failed to create bean in 
database
javax.transaction.RollbackException: Already marked for rollback
        at org.jboss.tm.TxCapsule.commit(TxCapsule.java:271)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
        at org.jboss.tm.TxManager.commit(TxManager.java:106)
        at 
org.jboss.ejb.EnterpriseContext$UserTransactionImpl.commit(EnterpriseContext.java:295)
        at de.dig.vsb.ejb.statistic.StatisticBean.ejbCreate(StatisticBean.java:158)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:120)
        at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:86)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:126)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:143)
        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:191)
        at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:198)
        at $Proxy35.create(Unknown Source)
        at de.dig.vsa.stat.Statistikpool$StatCreateThread.run(Statistikpool.java:265)
        at de.dig.dfc.ThreadPoolManager$ServiceThread.run(ThreadPoolManager.java:273)

-- 
gruss
markus
 


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to