Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / January 2004

Tip: Looking for answers? Try searching our database.

Code shared between 2 EJB, where to put ?

Thread view: 
Marc Ferry - 19 Jan 2004 16:12 GMT
Hi,

I built an EAR (on WebLogic) that contains 2 session EJB which share
some common Java classes (utility methods for example).

I made a .jar with the .class of the common classes and I put it in
directory META-INF/lib of the EAR.

For the EJB to find the common library, I added the following line in
the MANIFEST.MF of the .jar of the EAR :
 Class-Path: META-INF/lib
But when deploying on WebLogic, the EJB cannot find the common classes.

What goes wrong ?

I tried to put the .class directly in the EJB (duplicating the shared
classes) but it did not work.
I also tried to modify the MANIFEST.MF of the .jar of the EJB but it did
not work neither.

Thanks for your help.
Marc
Nedim Cholich - 20 Jan 2004 01:52 GMT
Jaring all shared classes and putting that jar in the root of an ear
file will work for sure.

What version of WS are you using? WS has had various classloader problems.

> Hi,
>
[quoted text clipped - 18 lines]
> Thanks for your help.
> Marc
Nedim Cholich - 20 Jan 2004 01:53 GMT
Jaring all shared classes and putting that jar in the root of an ear
file will work for sure.

What version of WS are you using? WS has had various classloader problems.

> Hi,
>
[quoted text clipped - 18 lines]
> Thanks for your help.
> Marc
Doug Pardee - 21 Jan 2004 04:56 GMT
> I built an EAR (on WebLogic) that contains 2 session EJB which share
> some common Java classes (utility methods for example).
[quoted text clipped - 6 lines]
>   Class-Path: META-INF/lib
> But when deploying on WebLogic, the EJB cannot find the common classes.

You are close. The Manifest Class-Path must give the actual Jarfile
name (the same as in an ordinary classpath):

  Class-Path: META-INF/lib/mycommon.jar

or whatever you called your Jar file.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.