aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes Mulitple EJB jars in an ear -- deploy question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Mulitple EJB jars in an ear -- deploy question" Watch "Mulitple EJB jars in an ear -- deploy question" New topic
Author

Mulitple EJB jars in an ear -- deploy question

Greg Charles
Bartender

Joined: Oct 01, 2001
Posts: 2539
    
  10

I'm deploying an J2EE application as an ear file with one war and multiple EJB jars. If some of the EJBs in a.jar will act as clients to EJBs in b.jar, is there a preferred way to deploy it? Several options I've considered:

1. Duplicate the home and remote interfaces and any other classes I need from b.jar into a.jar.

2. Create a b-client.jar with the necessary classes and refer to it in the Classpath element of a.jar's manifest.

3. Just put b.jar in a.jar's manifest. (I'm not sure this will work.)

In any one of these approaches "the" right way? Or is there a better way I haven't considered?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
You have a single application which will be loaded by a classloader. This is why you should always package your app as an EAR. Just deploy it and your code should work.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17233
    
    1

Also remember that if you have one jar file in your ear need a class in one of the other jar files, I believe you need to put that other jar file info into the manifest for the first jar file.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Mulitple EJB jars in an ear -- deploy question
 
Similar Threads
jboss deploying ejbs in class path of deployment
weblogic applications classloader question and good practice?
Jar...
Are jars in EAR available
Manifest file not working in J2EE project?