Bug 904174 - Issue with TCCL which is causing the Quartz thread to not have access to the application's "java:app" context
Summary: Issue with TCCL which is causing the Quartz thread to not have access to the ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Seam2
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Marek Novotny
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-25 16:36 UTC by Luan Cestari
Modified: 2018-12-03 18:12 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 11:05:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
An example of Source (it isn't the same version of attached EAR, but it is almost identical) (8.89 MB, application/octet-stream)
2013-05-06 12:33 UTC, Luan Cestari
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBSEAM-5072 0 Major Closed Issue with TCCL which is causing the Quartz thread to not have access to the application's "java:app" context 2019-06-07 01:41:35 UTC

Description Luan Cestari 2013-01-25 16:36:36 UTC
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

Comment 8 Marek Novotny 2013-04-16 09:59:54 UTC
Have you tried to use global JNDI instead?

Comment 9 Luan Cestari 2013-04-22 12:23:15 UTC
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

Comment 11 Luan Cestari 2013-05-06 12:33:23 UTC
Created attachment 744106 [details]
An example of Source (it isn't the same version of attached EAR, but it is almost identical)

Comment 18 JBoss JIRA Server 2013-09-24 12:04:22 UTC
Marek Novotny <mnovotny> updated the status of jira JBSEAM-5072 to Closed

Comment 19 JBoss JIRA Server 2013-09-24 12:04:22 UTC
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.

Comment 20 JBoss JIRA Server 2013-09-26 12:25:39 UTC
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?

Comment 22 Ivo Studensky 2015-03-19 11:05:38 UTC
The upstream issue has been closed as Won'tFix.


Note You need to log in before you can comment on or make changes to this bug.