Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB3 Timer service with non-serializable data  RSS feed

 
Adam Marr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, upgrading and trying to replace quartz with the ejb3 timer service. Worked just fine for some cases, but the issue now is one of the jobs requires a reference to the request/response (used by a backend service to generate dynamic html emails). These objects are not serializable (so using info on the timer object is out). Looked into stateful beans, but it sounds like getHandle no longer works with ejb objects? Would prefer not to use static fields for this. Is there an easy way to do this with ejb3... something along the lines of...

bean1{
createTimer() {
Initctx...lookup(bean2)
bean2.set(req, resp)
cxt.getTS...(900, 900, bean2.getHandle())
}

timeout(timer) {
bean2 = timer.getInfo()
bean2.doWork()
}

thanks...
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this getHandle thing seems to be from EJB 2.1. I don't have any idea about it but maybe this discussion will help you...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!