Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: J2EE Packaging options

Ben Hill

2004-03-01

Replies:

Ashutosh Bhardwaj wrote:
> I am using websphere 5.0.2 with wsad5.1.I have created a j2ee project in
> wsad with one ejb project and one web project.The
>
> Ejb project needs to refers lot of files which actually exist in web
> project.These files include loggers,common dao components etc. Is their
> any way that I can refer to files in war from an ejb jar.

I'd probably split out the parts of the ejb jar and webapp war that are
common and add them to a plain old jar file. You needn't put this jar
file in the application.xml for the ear; but add this jar to the ear itself.

Then for each of the ears, jars and wars that need to refer to something
in this jar add a class path manifest entry.

For example: your common code jar is called "foo.jar", so in the ejb jar
MANIFEST.MF add:

Class-path: foo.jar

Then the classloader will know to look in that jar to resolve
classloading issues from the ejb jar.

Hope this helps,

Ben

www.javacoder.net

===========================================================================
To unsubscribe, send email to listserv@(protected)
of the message "signoff J2EE-INTEREST". For general help, send email to
listserv@(protected)".


©2008 junlu.com - Jax Systems, LLC, U.S.A.