This content has been marked as final.
Show 4 replies
-
1. Re: Seam Quartz JobInitializationPlugin EntityManager null
kapitanpetko Mar 5, 2010 4:38 PM (in response to had1980)If your job is an SLSB, just use @PersitenceContext to inject the EM and your will be OK.
HTH
-
2. Re: Seam Quartz JobInitializationPlugin EntityManager null
had1980 Mar 5, 2010 4:48 PM (in response to had1980)I already tried to put this:
@Stateless
@Name("JobsRunnerWithSeam")
public class JobsRunnerWithSeamBean implements Job, JobsRunnerWithSeam
{
@PersistenceContext
EntityManager em;
public void execute(JobExecutionContext context) throws JobExecutionException
{
System.out.println("Entity Manager is: "+em);
...
}
...
}but didn't work :(
-
3. Re: Seam Quartz JobInitializationPlugin EntityManager null
had1980 Mar 5, 2010 4:51 PM (in response to had1980)sorry for the previous formatting
I already tried to put this:
@Stateless @Name("JobsRunnerWithSeam") public class JobsRunnerWithSeamBean implements Job, JobsRunnerWithSeam { @PersistenceContext EntityManager em; public void execute(JobExecutionContext context) throws JobExecutionException { System.out.println("Entity Manager is: "+em); ... } ... }
but didn't work :(
-
4. Re: Seam Quartz JobInitializationPlugin EntityManager null
kapitanpetko Mar 6, 2010 4:51 AM (in response to had1980)Maybe it's not intercepted for some reason. You'll need to post more code. BTW, is there any specific reason you are not using @Asynchronous? You can use Quartz with it.