I have a abc1.sar file which calls a POJO --> abc.java which inturns calls SessionBean. In jboss-service.xml I have an etry like: <server> <MyMbean code="abc" name="abc"> </MyMbean> </server>
My problem is : If I deploy abc1.jar --> It calls session Bean & it works fine But the moment I make abc1.sar & deploys the application I get following error: javax.naming.NameNotFoundException: ejb not bound
In short, when renamed as SAR file the way I want it, it is not able to locate Session Bean!
Well couldn't you seperate out the EJB side from the service side and have two deployments 1. the sar and the other a jar or ear. Think of it like the Tomcat sar. Would you include all your Servlets in that sar? No you wouldn't you have seperate applications.
I think that is probably the best OO approach, in that other services and applications can now all access the EJB without always having to go through the service.
As I need to pass a parameter from my start() method of my MBean to EJB; I want to call sessionbean in the same sar file only. I know that EJB Container needs to get called prior to MBean service. But just not getting how this can be done!! Tried in many ways but was of no use.. Can anybody help please.. Thanks in advance, -Ameeta
Funny thing, last night I was reading the JBoss Admin book, and was reading about creating MBeans and how some MBeans are dependant on EJBs being already deployed. Now I don't remember the exact part, but I do know that there is a dependcy with the Naming service, so in your XML you use a depends tag. If you have the book, it is near page 100, and you can download the PDF from jboss.org website.
I don't have the book with me right now. And of course, since I just read it, I don't remember the exact details.
--- MBeans waiting for other MBeans --- ObjectName: com.gameteclabs.bizlogic.workflow:service=CheckForDraw State: CONFIGURED I Depend On: jboss.j2ee:service=EJB,jndiName=ejb/ADMDrawResults1Bean
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- ObjectName: jboss.j2ee:service=EJB,jndiName=ejb/ADMDrawResults1Bean State: NOTYETINSTALLED Depends On Me: com.gameteclabs.bizlogic.workflow:service=CheckForDraw
Thanks Jaikiran..I referred to same link before & it worked. Thanks Mark for your note too..I have seperated out ejb from sar. But sar is working when I invoke start method in JMX console manually. Actually it should run start method continuously & automatically.. Ranchers..any idea how to achieve this? Thanks, Ameeta