• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About ejb-jar file

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic