[wildfly-dev] ConcurrentAccessTimeoutException using producer in stateful bean

Tomas Remes tremes at redhat.com
Tue Aug 16 07:26:01 EDT 2016


Hi Arjan,

Can you please share some reproducer app? It would be helpful.

Thanks
Tom

----- Original Message -----
From: "arjan tijms" <arjan.tijms at gmail.com>
To: "WildFly Dev" <wildfly-dev at lists.jboss.org>
Sent: Tuesday, August 16, 2016 1:12:22 PM
Subject: [wildfly-dev] ConcurrentAccessTimeoutException using producer in	stateful bean

Hi, 

I came across a situation where a ConcurrentAccessTimeoutException is thrown on WildFly 10.0.0 and 10.1cr1 when an @Stateful @ViewScoped bean contains a CDI producer. 

In short, there are 3 beans all @Stateful @ViewScoped. Beans 1 and 2 are injected in bean 3. 

Bean 1 contains a CDI producer. 
Bean 2 is injected with a type from said producer. 

The following causes a ConcurrentAccessTimeoutException to be thrown: 

bean3.somemethod: 
tx start 
access stateful bean 1 
access stateful bean 2 
(from statefull bean 2): access injected type that causes producer from bean 1 to be called 
tx end 

If the call to stateful bean 1 is omitted, the producer is called normally when bean 2 accesses the injected type. 

If bean 2 is injected directly with bean 1, then bean 1 can be accessed without any ConcurrentAccessTimeoutException being thrown. 

The code runs fine on WildFly 8.2. 

I'll do some further digging, but wonder if this problem rings any bells. Could it be that CDI obtains a reference to the stateful bean in such a way that the implicit EJB interceptor doesn't see it's still within the same TX? But since there's no call to bean 1 in progress at that point, should this even matter? 

Kind regards, 
Arjan Tijms 

_______________________________________________
wildfly-dev mailing list
wildfly-dev at lists.jboss.org





More information about the wildfly-dev mailing list