• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

About ejb-jar file

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic