• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Problem  RSS feed

 
sam he
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's the different between the EJBS in different "*.jar"s?
why can't i share the class's static properties between EJBs in different "*.jar"s?
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
A jar file is just a packaging format for the various ejbs. We just create ejb classes then package them in jars and then we deploy the jar file either directly or by making a new file which is an ear file.
Its as simple as that
 
Steve Chernyak
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on the application server, and how you deploy the EJBs it could be a classloader issue.
Could you provide more details about your problem?
SteveC
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How should the beans be packaged ? In one JAR or in multiple jars ?
I've seen people put Entity beans in one and Session in another ... Is this for a reason ?

What is best ?
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"heilnqing", please could you take a quick look at the naming policy and edit your profile accordingly.
Welcome to JavaRanch, and we hope that you enjoy your stay.
Cheers
Simon
 
sam he
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i deployed the "*.jar"s to weblogic ,i can not share the static properties of class in one "* jar" with others.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats a bit strange sam. I refer to this link
http://edocs.bea.com/wls/docs70/programming/classloading.html#1029830
and the figure 3-1. What i see is that there is a System Classpath classloader
a Ejb Class Loader
and an Web app classloader
The EJB1 and EJB2 are shown as ifthey coexist withing a single class loader so if they share a utility class for example it should be available to both EJB1 and EJB2.
Another question that comes to my mind is that if EJB1 invokes EJB2 which are in different jars then do the EJB1 jar file need to have the EJB2 Home and remote classes.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a great chapter about J2EE Packaging and Deployment that you might find useful.
Simon
p.s. thanks for changing your name
[ July 12, 2002: Message edited by: Simon Brown ]
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THanks That really made a difference to me

Dave Van Even
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!