aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes About ejb-jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "About ejb-jar file" Watch "About ejb-jar file" New topic
Author

About ejb-jar file

Li Xin
Ranch Hand

Joined: Feb 06, 2004
Posts: 37
The specification mentions that J2EE classes/interfaces should not be included in the JAR file, does it mean that if my bean needs another helper class or extends another class, these classes cannot be included in the JAR file? Then how does the container know where to look for these classes?
Thanks.
Sudhir V
Ranch Hand

Joined: Dec 25, 2002
Posts: 143
The spec Pg 448 sec 23.3 says
"The ejb-jar file must also contain, either by inclusion or by reference, the class files for all the classes and interfaces that each enterprise bean class and the home and component interfaces depend on, except
J2EE and J2SE classes".
So if ur bean class/home/component depends on classes or interfaces which u have created then they have to included in the jar file, any dependency on inbuilt classes & interfaces need not be included. Ex: Session bean class implements SessionBean interface. But since SessionBean is a J2EE interface it need not be included in the jar file


Sudhir V<br />(SCJP 1.2, SCWCD, OCA, SCBCD)
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
Originally posted by Li Xin:
The specification mentions that J2EE classes/interfaces should not be included in the JAR file, does it mean that if my bean needs another helper class or extends another class, these classes cannot be included in the JAR file? Then how does the container know where to look for these classes?
Thanks.

What it means is that the standard J2EE SDK interfaces/classes like EJBObject, EJBHome, EnterpriseBean, EJBException etc....should not be bundled along with your application jar.
All the dependent/helper classes that have been written by the bean developer and used in the bean code needs to be included in the jar file.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: About ejb-jar file