This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes Bean class doesn't implement home and remote interfaces? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bean class doesn Watch "Bean class doesn New topic
Author

Bean class doesn't implement home and remote interfaces?

Michael Brewer
Ranch Hand

Joined: Jun 27, 2002
Posts: 54
I'm reading through jGuru's Enterprise JavaBeans Fundamentals. On page 7 of my print out, it states that EJB doesn't require, in fact it is encouraged that they not, implementing the home or remote interfaces. It says that the container will implement these.
What I don't understand is how the container knows to implement them? For instance, the CustomerHome interface in their example defines create(Integer customerNumber). How does the container know how to instantiate the CustomerBean with customerNumber? Does it do this through introspection of the CustomerBean class? I note that their example of CustomerBean doesn't implement a mutator for a customerNumber property.
How does it work?
Eduard Manas
Ranch Hand

Joined: May 12, 2002
Posts: 69
Michael,
What are you after here is the 'missing link'; between bean class and container.
You define that link in the ejb deployment descriptor.
Eduard
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Bean class doesn't implement home and remote interfaces?