This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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).
 
Consider Paul's rocket mass heater.
 
subject: WAS7 Scheduler with EJB3.0
 
Similar Threads
An error occurred while parsing parameters. {0} java.io.IOException-WAS7
solution for EJB3.0 and Open JPA in WAS7
EJB3 JNDI lookup in WAS7
WAS7
Another WAS7 issue regarding local session beans