This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 1064
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About ejb-jar file