EJB programming & troubleshooting: How to access an EJB through a JavaBean class ?
- Posted by: Sanjit Singh
- Posted on: October 16 2001 07:53 EDT
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.
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).
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