EJB programming & troubleshooting: How to access an EJB through a JavaBean class ?

  1. How to access an EJB through a JavaBean class ? (2 messages)

    Dear All,

    I am new to EJB´s.I have my JavaBean called OrderBean that is in my web container. I have tried to use the MVC architecture in my J2ee application, but somehow cant really find any examples that would help the OrderBean in the web container to contact (create an instance) my "TraderController" session bean(EJB) in my EJB container.
    If anyone of you know some resources that would help me out or even sample code, then I would be grateful.
    I know that I have to create an instance of the home interface of the TraderController EJB, but nothing more than that.
    Help would be appreciated.

    With regards,
  2. Download the Mastering EJB book from this site and read through that. It will tell you all you need to know to get started (and then some).

  3. Look into creating an InitialContext to get the Home
    interface downloaded. Then call the Home interface's
    create() method to get the remote interface. The remote
    interface is your client's tool to making server side
    EJB calls.