EJB References


EJB programming & troubleshooting: EJB References

  1. EJB References (2 messages)

    Hi guys

    Am developing a EJB sample app, where one EJB calls another EJB, but I haven't been able to get it work.From what I've read, I only need to change my deployment descriptor and code in the way I described bellow.

    Following is a snippet of both the code and the deployment descriptor:

    Have a Machine Session ( stateless ) bean which builds Components session (stateful ) beans


    InitialContext ctx = new InitialContext();
    Object result = ctx.lookup("java:comp/env/ejb/ComponentHome");
                ComponentHome home = (ComponentHome) javax.rmi.PortableRemoteObject.narrow(result,ComponentHome.class);

    Deployment descriptor:

         <session id="Machine">
            <description>This is a ejb reference, i.e a Machine bean uses a Component</description>

    Any hints? I really appreciate any shed of light here ;-)

    Threaded Messages (2)

  2. EJB References[ Go to top ]

    Have you taken care of the vendor specific XML where you point ejb/ComponentHome from <ejb-ref-name> to the *real* JNDI name? e.g. in WLS

  3. EJB References[ Go to top ]

    Hi Dion

    thanks for your reply. I am using WAS 4.0. Have you worked with it? if so, I would really appreciate if you can give a hand here or any other info i could look into...