[jboss-jira] [JBoss JIRA] (WFLY-9492) Concurrent access timeout on StatefulBean when invoked via StatelessBean

Stuart Douglas (JIRA) issues at jboss.org
Mon Oct 30 23:41:00 EDT 2017


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

Stuart Douglas resolved WFLY-9492.
----------------------------------
    Resolution: Rejected


You need to use @Inject, and not @EJB. @EJB has its own lifecycle rules when used in EJB's, and as a result you will not get a CDI proxy injected into the SLSB but a single instance of the SFSB's whoes lifecycle is tied to the stateless bean.

> Concurrent access timeout on StatefulBean when invoked via StatelessBean
> ------------------------------------------------------------------------
>
>                 Key: WFLY-9492
>                 URL: https://issues.jboss.org/browse/WFLY-9492
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 10.1.0.Final, 11.0.0.Final
>            Reporter: Thies Rubarth
>         Attachments: sfsbLock.zip
>
>
> We are having issues with a stateful bean that is invoked serveral times in a request to calculate things. We have a StatelessBean, that is called via REST and calls another StatelessBean which calls the StatefulBean which is request scoped. When we have parallel requests it comes to ConcurrentAccessTimeoutExceptions on the StatefulBean, although we shoudn't have concurrent access since the Bean is request scoped.
> This is the stacktrace we get:
> Caused by: javax.ejb.ConcurrentAccessTimeoutException: WFLYEJB0228: EJB 3.1 FR 4.3.14.1 concurrent access timeout on StatefulBean - could not obtain lock within 5000 MILLISECONDS
> 	at org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.processInvocation(StatefulSessionSynchronizationInterceptor.java:94)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> 	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
> 	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> 	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 	at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:59)
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:254)
> 	... 213 more



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list