-
1. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
tremes Sep 9, 2016 8:15 AM (in response to rumpelstilzchen926)Hi,
I am not very experienced in this area but I guess the original behaviour is correct. EJB spec 4.8.5 Singleton Session Bean Concurrency states:
Independent of the bean’s concurrency management type, the container must ensure that no concurrent
access to the singleton session bean instance occurs until after the instance has successfully completed
its initialization sequence, including any PostConstruct lifecycle callback method(s). The con-
tainer must temporarily block any singleton session bean access attempts that arrive while the singleton
session bean is still initializing.
and TestReader @PostConstruct already happened.
-
2. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
rumpelstilzchen926 Sep 9, 2016 9:56 AM (in response to tremes)Interesting. Then this would be a Wildfly 10.1.0 bug? Where could I report it?
-
3. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
tremes Sep 12, 2016 1:38 AM (in response to rumpelstilzchen926)Maybe it is. You can report it at https://issues.jboss.org project WildFly. Thanks
-
4. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
rumpelstilzchen926 Sep 12, 2016 5:46 AM (in response to tremes)Thank you, Tomas. Issue created as [WFCORE-1782] Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct - JBoss Issue Tracker
-
5. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
tremes Sep 12, 2016 5:52 AM (in response to rumpelstilzchen926)I think It should go to WFLY project not WFCORE. Thanks
-
6. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
rumpelstilzchen926 Sep 13, 2016 3:20 AM (in response to tremes)You are right. As I don't know how to change category, the Wildfly developer must take care of this.
-
7. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
jaikiran Sep 13, 2016 8:42 AM (in response to rumpelstilzchen926)I haven't looked at the application you attached, but what exactly is blocked? The call to singleton bean B from the @PostConstruct of singleton bean A? And when you say blocked, can you get the thread dumps (a couple of them in intervals of around 3-5 seconds)? Also, is singleton bean A a @Startup singleton or a regular singleton?
-
8. Re: Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct
rumpelstilzchen926 Sep 13, 2016 11:07 AM (in response to jaikiran)Thank you jaikiran pai for changing the category to WFLY - [WFLY-7101] Wildfly 10.1.0 blocks calls to Singleton EJBs in PostConstruct - JBoss Issue Tracker
You asked
> ... what exactly is blocked? The call to singleton bean B from the @PostConstruct of singleton bean A?
This direct call works as the suplied example code shows - the call to singleton bean B is blocked
if done from a thread created with a ManagedExecutor from the @PostConstruct of singleton bean A.
> And when you say blocked, can you get the thread dumps (a couple of them in intervals of around 3-5 seconds)?
Just execute the example I supplied - the @Postconstruct thread waits 10 seconds and during this 10 seconds
the 4 created threads are blocked and they continue to run after the @PostConstruct thread has left the method.
> Also, is singleton bean A a @Startup singleton or a regular singleton?
I made it @Startup for demonstration purpose, the bug appeared first in a non-@Startup singleton bean.