wood burning stoves*
The moose likes Websphere and the fly likes WAS7 Scheduler with EJB3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS7 Scheduler with EJB3.0" Watch "WAS7 Scheduler with EJB3.0" New topic
Author

WAS7 Scheduler with EJB3.0

Aleksandar Babic
Ranch Hand

Joined: May 30, 2007
Posts: 68
It seems that scheduler in WAS7 is not upgraded to work with EJB3.0
After creating BeanTaskInfo we need to call method taskInfo.setTaskHandler that receives TaskHandlerHome as param.
Since EJB3.0 is missing home interface method is throwing ClassCastException.
With EJB2.1 everything is ok.

Is there a way to use EJB3.0 stateless bean with WAS7 Scheduler BeanTaskInfo?
John Worley
Greenhorn

Joined: Oct 25, 2004
Posts: 2
Did you resolve your problem? I was wondering if you used the @RemoteHome annotation (in your EJB3 session bean) and an EJBHome.
Aleksandar Babic
Ranch Hand

Joined: May 30, 2007
Posts: 68
I resolve it by using EJB2.1.
I tried everything that comes to my mind including @RemoteHome annotation, without success.
But you can have separate 2.1 and 3.0 modules in same ear. Use 2.1 only for task class that need to implement home interface, and write rest of the code in 3.0

If I recall correctly, if you use scheduler to send JMS message you won't need EJB 2.1 module.
John Worley
Greenhorn

Joined: Oct 25, 2004
Posts: 2
Thanks for the response. I went down that same path. I was hoping there was some slick way of registering and EJB 3 session bean as the task handler but ran into the same things you did. I have it working now like you did - created an EJB 2 project with a single EJB 2 session bean as the task handler and deployed it in the same EAR as my EJB 3 application. The EJB 2 task handler process method can call out to my EJB 3 session bean(s).
 
jQuery in Action, 2nd edition
 
subject: WAS7 Scheduler with EJB3.0