JBoss Community

EJB3 TimerService on JBoss6 final

created by elico.a in EJB3 - View the full discussion

Hi,

 

I am upgrading from JBoss 4.2.2 to JBoss6_Final and have some unresolved issues that I would appreciate your help.

 

I have an EJB3 that uses TimerService:

 

@Startup

@Singleton

public class MyClassImpl implements MyClassLocal

{

    @Resource

    private TimerService timerService;

   

    @PostConstruct

    public void initService()

    {               

        long timeTillNextRun = getTimeTillNextRun();

        timerService.createTimer( timeTillNextRun, 1000*60*60, null );

    }

}

 

The problem that the line timerService.createTimer( timeTillNextRun, 1000*60*60, null ); throws NullPointerException, as if the injection didn't work.

 

Do you might have any idea what goes wrong?

 

Thanks in advance.

 

Eli.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community