EJB JAR file be part of two Enterprise Application Archive (EAR)files... - Websphere

This is a discussion on EJB JAR file be part of two Enterprise Application Archive (EAR)files... - Websphere ; hi Can anybody help me out in this question... A system administrator requires that an EJB JAR file be part of two Enterprise Application Archive (EAR) files. How can this be BEST accomplished using the Application Server Toolkit (AST)? these ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: EJB JAR file be part of two Enterprise Application Archive (EAR)files...

  1. EJB JAR file be part of two Enterprise Application Archive (EAR)files...

    hi

    Can anybody help me out in this question...
    A system administrator requires that an EJB JAR file be part of two Enterprise Application Archive (EAR) files. How can this be BEST accomplished using the Application Server Toolkit (AST)? these r the possible options...

    A.Use the JDK's JAR utility to include the WAR file in the EAR files.
    B.Use the Application Deployment Descriptor editor to add the EJB module to each of the applications.
    C.Open the Properties dialog for the EJB project and select the applications in the Project References dialog.
    D.Open the Properties dialog for both Enterprise Application projects and select the EJB module in the Project References dialog.


    Madhu

  2. Re: EJB JAR file be part of two Enterprise Application Archive (EAR) files...

    If you include the same EJB Jar in two EAR, WAS will try to startup the ejbs
    twice, one time for each EAR. I'm afraid that you'll get an exception like
    "NameAlreadyInUse".

    I think that the best would be deploy a third EAR containing all shared Ejbs
    and then let J2EE apps look up for them via JNDI.

    Scorpio.



    ha scritto nel messaggio
    news:1013411832.1186046651714.JavaMail.wassrvr@lts gwas010.sby.ibm.com...
    > hi
    >
    > Can anybody help me out in this question...
    > A system administrator requires that an EJB JAR file be part of two
    > Enterprise Application Archive (EAR) files. How can this be BEST
    > accomplished using the Application Server Toolkit (AST)? these r the
    > possible options...
    >
    > A.Use the JDK's JAR utility to include the WAR file in the EAR files.
    > B.Use the Application Deployment Descriptor editor to add the EJB module
    > to each of the applications.
    > C.Open the Properties dialog for the EJB project and select the
    > applications in the Project References dialog.
    > D.Open the Properties dialog for both Enterprise Application projects and
    > select the EJB module in the Project References dialog.
    >
    >
    > Madhu




  3. Re: EJB JAR file be part of two Enterprise Application Archive (EAR)files...

    I'm afraid there is no much of freedom here - J2EE specs define the packaging of an enterprise
    application quite precisely. So if you want EJB module be a part of two apps, then each .ear file of
    those apps must have its own copy of the EJB module. So the subject of the topic - "EJB JAR file is
    the part of two EAR files" - seems to be conflicting with the specs.

    How to do this technically - there is the number of ways: RAD, AST, Ant, Maven, manual build of .ear
    with the jar utility, automated build of .ear with jar utility using make...

    For the developers it's probably easier to use RAD to build .ear for their unit testing purposes.
    For other folks (primarily release engineers) I would select some GUIless tools like Ant scripts
    that allow to ran the build in unattended mode, e.g. nightly builds for following automated
    regression testing.

    madhus1212@yahoo.com wrote:
    > hi
    >
    > Can anybody help me out in this question...
    > A system administrator requires that an EJB JAR file be part of two Enterprise Application Archive (EAR) files. How can this be BEST accomplished using the Application Server Toolkit (AST)? these r the possible options...
    >
    > A.Use the JDK's JAR utility to include the WAR file in the EAR files.
    > B.Use the Application Deployment Descriptor editor to add the EJB module to each of the applications.
    > C.Open the Properties dialog for the EJB project and select the applications in the Project References dialog.
    > D.Open the Properties dialog for both Enterprise Application projects and select the EJB module in the Project References dialog.
    >
    >
    > Madhu


  4. Re: EJB JAR file be part of two Enterprise Application Archive (EAR) files...


    "Yuriy Petrov" ha scritto nel messaggio
    news:f8si9g$1506a$1@news.boulder.ibm.com...
    > I'm afraid there is no much of freedom here - J2EE specs define the
    > packaging of an enterprise application quite precisely. So if you want EJB
    > module be a part of two apps, then each .ear file of those apps must have
    > its own copy of the EJB module.


    But in this case, should not you have to define at deployment time the JNDI
    name of each home interface ?

    Scorpio.



+ Reply to Thread