This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
Did you resolve your problem? I was wondering if you used the @RemoteHome annotation (in your EJB3 session bean) and an EJBHome.
Joined: May 30, 2007
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.
Joined: Oct 25, 2004
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).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com