[jboss-jira] [JBoss JIRA] (WFLY-2522) Error when invoking @Remove method for stateful bean in transaction

Stuart Douglas (JIRA) issues at jboss.org
Fri Jan 31 10:39:29 EST 2014


     [ https://issues.jboss.org/browse/WFLY-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas updated WFLY-2522:
---------------------------------

              Priority: Major  (was: Blocker)
    Steps to Reproduce: 
1- Download projects from http://www.filedropper.com/jbosstxsyncerror

The zip contains 3 projects

JBossTxSyncError : EJB Project

JBossTxSyncErrorClient : EJB Client Project

JBossTxSyncErrorEar : Ear project

2- Import project into Eclipse

3- add required libraries in build path

JBossTxSyncError

JBoss 7.1 Runtime

JBossTxSyncErrorClient

jboss-client.jar

jboss-ejb-api_3.1_spec-1.0.2.Final.jar

4- create table using create.sql file under JBossTxSyncErrorClient

5- configure jboss-ejb-client.properties file under JBossTxSyncErrorClient

6- configure a datasource for mysql connection

7- enter datasource Jndi name in file messages.properties under JBossTxSyncError project in key EmployeeBean.datasourceJndi

8- deploy ear file and run OldEjbClient.java

  was:

1- Download projects from http://www.filedropper.com/jbosstxsyncerror

The zip contains 3 projects

JBossTxSyncError : EJB Project

JBossTxSyncErrorClient : EJB Client Project

JBossTxSyncErrorEar : Ear project

2- Import project into Eclipse

3- add required libraries in build path

JBossTxSyncError

JBoss 7.1 Runtime

JBossTxSyncErrorClient

jboss-client.jar

jboss-ejb-api_3.1_spec-1.0.2.Final.jar

4- create table using create.sql file under JBossTxSyncErrorClient

5- configure jboss-ejb-client.properties file under JBossTxSyncErrorClient

6- configure a datasource for mysql connection

7- enter datasource Jndi name in file messages.properties under JBossTxSyncError project in key EmployeeBean.datasourceJndi

8- deploy ear file and run OldEjbClient.java



This only occurs if you attempt to remove an EJB in a transaction synchronization callback. 
                
> Error when invoking @Remove method for stateful bean in transaction
> -------------------------------------------------------------------
>
>                 Key: WFLY-2522
>                 URL: https://issues.jboss.org/browse/WFLY-2522
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EJB
>    Affects Versions: 8.0.0.Beta1
>            Reporter: noel a.a
>            Assignee: David Lloyd
>
> I'm invoking method annotated with @Remove
> {code}
> @Remove
> public void remove() {
> ...
> {code}
> On invocation inside active transaction I'm getting following error :
> {noformat}
> Caused by: java.lang.IllegalStateException: ARJUNA016082: Synchronizations are not allowed! Transaction status isActionStatus.RUNNING
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:374)
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronization(TransactionImple.java:351)
> at org.jboss.as.ejb3.cache.TransactionAwareObjectFactory.destroyInstance(TransactionAwareObjectFactory.java:66) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.as.ejb3.cache.impl.backing.NonPassivatingBackingCacheImpl.remove(NonPassivatingBackingCacheImpl.java:165) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.as.ejb3.cache.impl.backing.NonPassivatingBackingCacheImpl.remove(NonPassivatingBackingCacheImpl.java:57) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.as.ejb3.cache.spi.impl.AbstractCache.remove(AbstractCache.java:100) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.as.ejb3.cache.spi.impl.AbstractCache.remove(AbstractCache.java:39) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.removeSession(StatefulSessionComponent.java:283) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.as.ejb3.component.stateful.StatefulRemoveInterceptor.processInvocation(StatefulRemoveInterceptor.java:100) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:67) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:200) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
> ... 140 more
> {noformat}
> EJB Spec paragraphe 4.6.4 states:
> {quote}
> If a session bean instance is participating in a transaction, it is an error for a client to invoke the remove method on the session object’s home or component interface object. The container must detect such an attempt and throw the javax.ejb.RemoveException to the client. The container should not mark the client’s transaction for rollback, thus allowing the client to recover. Note that this restriction only applies to the remove method on the session object’s home or component interface, not to the invocation of @Remove methods.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list