-
1. Re: @Singleton / @Startup and <init-on-startup> priorities
jaikiran Sep 23, 2011 10:21 AM (in response to pedrokowalski)Can you give this a try against the just released 7.0.2? If it still is a issue in that version then please file a JIRA.
-
2. Re: @Singleton / @Startup and <init-on-startup> priorities
pedrokowalski Sep 23, 2011 10:25 AM (in response to jaikiran)As usual rapid answer :-)
I've just gave it a try (didn't know that the 7.0.2 was released! Great!).
Unfortunately - without any luck - it's still initializing. I'll file a JIRA right away.
Thanks!
-
3. Re: @Singleton / @Startup and <init-on-startup> priorities
jaikiran Sep 23, 2011 10:27 AM (in response to pedrokowalski)There are some bugs in the annotation + DD merging. So this looks like one of them.
-
4. Re: @Singleton / @Startup and <init-on-startup> priorities
pedrokowalski Sep 23, 2011 10:33 AM (in response to jaikiran)Ok, thanks for clafirication.
I've filed a JIRA request and linked to this topic.
Right now I have made a workaround while waiting for this one being solved :-)
Cheers!
-
5. Re: @Singleton / @Startup and <init-on-startup> priorities
hwangarias Oct 31, 2012 5:52 AM (in response to pedrokowalski)Hello Piotr, could you share your workaround,
at the time of writing in version 7.1.3 this code in org/jboss/as/ejb3/deployment/processors/merging/StartupMergingProcessor.java
SessionBean31MetaData singletonBeanMetaData = (SessionBean31MetaData) data; Boolean initOnStartup = singletonBeanMetaData.isInitOnStartup(); if (initOnStartup != null && initOnStartup) { description.initOnStartup(); }
makes me thing you can override to TRUE but no "deactivate" the startup
-
6. Re: @Singleton / @Startup and <init-on-startup> priorities
pedrokowalski Oct 31, 2012 10:33 AM (in response to hwangarias)Hello Hwang,
Frankly - I don't remember what was the workaround for this one. I think I might changed the design (it was for arquillian testing AFAIR).
I recall that there were some non-obvious requirements for this <init-on-startup> element (I don't remember if it was a talk on JBoss IRC or somewhere else).
Perhaps it will be easier to add the startup flag to 'true' instead of deactivating it.