Description of problem: Issue with TCCL which is causing the Quartz thread to not have access to the application's "java:app" context. In other words, Seam can`t find the beans in context, even that they are there (due the annotations and logs that confirm that). EAP 6`s documentation that gives the steps to migrate Seam 2 applications: https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_Application_Platform/6/html-single/Migration_Guide/index.html#sect-Migrate_Seam_2.2_Applications Version-Release number of selected component (if applicable): Seam 2.2 in EAP 6 How reproducible: Just create a Seam and Quartz bean and another Seam and EJB bean that on Startup will lookup for Seam/Quartz bean, but can`t find it. Actual results: Can`t find the bean Expected results: Find the bean Additional info: salesforce link: https://c.na7.visual.force.com/apex/Case_View?id=500A000000CQzrg&sfdc.override=1
Have you tried to use global JNDI instead?
Hi Marek, In InitilizeTimers class he used Seam API to find or create the timers ( Component.getInstance(nme, true, true)). About using the JNDI, I remember that we tried but it didn`t work as well. I Also talked with a guy from SEG that confirmed about TCCL. Regards, Luan
Created attachment 744106 [details] An example of Source (it isn't the same version of attached EAR, but it is almost identical)
Marek Novotny <mnovotny> updated the status of jira JBSEAM-5072 to Closed
Marek Novotny <mnovotny> made a comment on jira JBSEAM-5072 Basically before JBoss AS7 existance all JBoss servers (4,5,6) had a quartz Resource adapter which introduced and set up the correct EJB initial context. So Seam 2 pojo component worked. JBoss AS7 implements Java EE 6 and it enhanced TimerService features so AS team didn't invest any time to resource adapter for another timer scheduler/service as is Quartz. Every non-ejb thread needs to use java:global JNDI or create scheduler thread(s) from EJB component, recommended is EJB Singleton.
Claus Elsborg <claus.elsborg> made a comment on jira JBSEAM-5072 It looks like java:global JNDI is not available until the application is fully deployed. This means that quartz jobs that fires during startup throws a javax.naming.NameNotFoundException: appname/jboss-seam/EjbSynchronizations -- service jboss.naming.context.java.global.appname.jboss-seam.EjbSynchronizations. If Quartz jobs are persisted in a database, the quartz jobs gets scheduled during the QuartzDispatcher.java Startup. If using RAM store, it is normal to schedule the jobs by observing the org.jboss.seam.postInitialization event. But even here it still fails. After deployment is complete the jobs works fine. For the described workaround to be useful I need a way to schedule quartz jobs during deployment or a least just after deployment completes in order to handle "misfires" during server down time. Any ideas of how to do this?
The upstream issue has been closed as Won'tFix.