ejb « quartz « Java Enterprise Q&A

1. How to access QUARTZ_FACTORY_KEY from an ejb?    forums.terracotta.org

Hi, I am successfully able to start scheduler using QuartzInitializerListener during application deployment. Now, I want to access the scheduler factory object (to get the scheduler) in an ejb. What are the different options I have? How can I acess the servlet context from a start-up class or a quartz job ? Thanks in advace, pasam

2. Lookup EJB from Job class    forums.terracotta.org

3. Retrieve Quartz scheduler from EJB    forums.terracotta.org

Yes, but you have to somehow get a handle to it over in the EJB. It's possible, depending upon the setup of your application (depending upon separation of class loader space between webapp and ejb app) that you can just ask for a handle to it from a StdSchedulerFactory and get the very same instance. However if the classloader space is ...

5. How to call a EJB3 job    forums.terracotta.org

23:17:00,015 ERROR [ErrorLogger] Job (Test Report.Test Quartz threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ClassCastException: Cannot narrow remote object [BaseRemoteObject] home: weblogic.ejb.container.internal.StatelessEJBHomeImpl@16fbbd4 to javax.ejb.EJBHome] at org.quartz.core.JobRunShell.run(JobRunShell.java:227) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: java.lang.ClassCastException: Cannot narrow remote object [BaseRemoteObject] home: weblogic.ejb.container.internal.StatelessEJBHomeImpl@16fbbd4 to javax.ejb.EJBHome at weblogic.corba.server.naming.ReferenceHelperImpl.narrow(ReferenceHelperImpl.java:209) at weblogic.rmi.extensions.PortableRemoteObject.narrow(PortableRemoteObject.java:88) at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:32) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137) at org.quartz.jobs.ee.ejb.EJBInvokerJob.execute(EJBInvokerJob.java:163) at org.quartz.core.JobRunShell.run(JobRunShell.java:216) ... 1 more

6. Quartz scheduling in EJB3    java-forums.org

Hi All, We recently migrated our Application from EJB2 to EJB3. The problem is we need the bean JNDI name for scheduling job in quartz. When i gave beanName/Remote my tasks are not getting scheduled. Can anyone help me with scheduling job with Quartz in EJB3 or any other alternative with EJB3?