[wildfly-dev] ConcurrentAccessTimeoutException using producer in stateful bean
arjan tijms
arjan.tijms at gmail.com
Tue Aug 16 07:12:22 EDT 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20160816/69541130/attachment-0001.html
More information about the wildfly-dev
mailing list