-
1. Re: em is always null in my quartz scheduler, plz help.
pmuir Aug 7, 2007 5:55 AM (in response to statelessbean)Probably because it's not a Seam component (needs @Name)
-
2. Re: em is always null in my quartz scheduler, plz help.
statelessbean Aug 7, 2007 6:29 AM (in response to statelessbean)This didn't helped. I added @Name("simpleJob") to my jobs class and other annotations to all classes :
@Name("schedulerSystem") and @Name("schedulerJobs") and in
listener is em, in schedulerJobs also is em implemented, but in my thread "simpleJob" em is null.
In seam pay example that i previosly used simple asynchronous thread had em.
Is any way to inject/implement my em into thread manually? -
3. Re: em is always null in my quartz scheduler, plz help.
pmuir Aug 7, 2007 6:37 AM (in response to statelessbean)If you want to access Seam outside a managed request (ejb3, jsf, async, ws) then you'll need to set up the contexts yourself - various Seam components do this. Much much easier to use Seam async.
-
4. Re: em is always null in my quartz scheduler, plz help.
gus888 Aug 11, 2007 10:10 PM (in response to statelessbean)Hi Pete,
I have the same problem. I created a subClass @override schedule method, which loads schedules from database. When I inject @In entityManager, it also got null. I don't have any idea how to deal with this situation. Could you please give some guidance? Thank you very much in advance.@Override protected Collection loadEntries(Date startDate, Date endDate) { List selection = em.createQuery( "select ea.event from EventAttendee ea " + "where ea.attendee = :person") .setParameter("person", user) .getResultList(); System.out.println("event size ===" + selection.size()); return selection; }
Best wishes,
Gus