Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-5291

JBOSS7 server calls getPrimaryKey() on Home interface business method on second call in same transaction

    XMLWordPrintable

Details

    • Hide

      Create a session bean with RequiresNew transaction. Call a ejbHome business method of entity bean with transaction attribute as mandatory.

      Show
      Create a session bean with RequiresNew transaction. Call a ejbHome business method of entity bean with transaction attribute as mandatory.
    • Compatibility/Configuration
    • Workaround Exists
    • Hide

      Temporary workaround is that always execute ejbHome methods in new or no transaction.

      Show
      Temporary workaround is that always execute ejbHome methods in new or no transaction.

    Description

      If any ejbHome business method is called more then once in same EJB transaction JBOSS7.1.1 server calls getPrimaryKey() on entity home interface. Following exception is thrown by JBOSS server.

      (java.lang.String): javax.ejb.EJBTransactionRolledbackException: JBAS014527: Cannot call getPrimaryKey() when state is entity bean home method
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:139)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:204)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:306)
      at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)
      at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
      at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            ion_mayank Mayank Gupta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: