aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes packaging EAR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "packaging EAR" Watch "packaging EAR" New topic
Author

packaging EAR

Neha Sen
Greenhorn

Joined: May 27, 2009
Posts: 20
hi,
this question may be very silly. I have a class say ClassX which referred in my web application module as well as ejb module. But my ejb module (ejb.jar) and web application module(web.war) are both packaged in same ear. Do I need to add ClassX in both war and jar separately? Because both war and jar are finally added in one ear.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

You can add the ClassX or I should say a jar containing that class in the EAR. Then I think you need to add that jar in the Manifest.mf of both the EJB and WAR modules which usually IDEs do automatically...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Neha Sen
Greenhorn

Joined: May 27, 2009
Posts: 20
I do not know how you do with IDE, i use eclipse.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

Neha,
You don't need two copies. The war can't point to the jar.

Eclipse is an IDE. Usually when you set a dependency in the project preferences, the manifest is updated.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Neha Sen
Greenhorn

Joined: May 27, 2009
Posts: 20
thank you Jeanne.
 
 
subject: packaging EAR