Code shared by 2 EJB, where to put ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Ferry

    Code shared by 2 EJB, where to put ?

    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
  • PerfectDayToChaseTornados

    #2
    Re: Code shared by 2 EJB, where to put ?

    "Marc Ferry" <mferry.ext@rd. francetelecom.c om> wrote in message
    news:bugvja$aoh 1@news.rd.franc etelecom.fr...
    | 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

    Hi Marc, I think that you need to name the jar explicitly, not just the
    directory in the manifest like Class-Path: META-INF/lib/myjar.jar
    see here

    --
    -P



    Comment

    Working...