Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-2026

Error when invoking @Remove method for stateful bean in transaction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Blocker
    • None
    • None
    • JTA
    • None
    • Hide

      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

      Show
      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
    • Medium

    Description

      I'm invoking method annotated with @Remove

      @Remove

      public void remove() {

      ...

      On invocation inside active transaction I'm getting following error :

      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

      EJB Spec paragraphe 4.6.4 states:
      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.

      Attachments

        Activity

          People

            thjenkin@redhat.com Tom Jenkinson
            noelaa5_jira noel a.a (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: