facebook

Deploying existing WAR and EJB Jars

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #221271 Reply

    leonidr
    Member

    Here is my situation:
    1. I am trying to migrate J2EE project from IntelliJ IDEA to MyEclipse.
    2. The project includes infrastructure WARs, EJBs and utility JARs that are already packaged as .war and .jar
    3. The project uses weblogic’s APP-INF/lib for infrastructure utility jars deployment

    How do I translate this project structure to MyEclipse under following conatraints:

    1. I want to link to already packaged utility jars instead of copying them into APP-INF/lib directory under MyEclipse EAR project., because utility jars are externally updated and I want to use updated ones every time deployment is done.
    2. I am not able to update manifest of already packaged EJBs to make it use utility jars deployed in EAR root.

    BTW: There is problem with application.xml. If I manually add reference to already packaged .war and ejb .jar the file name extension (.war or .jar) is stripped during exploded deployment.

    #221279 Reply

    Similar problem.

    I have several “external” WEB and EJB project. Esternal means I have them as packaged.
    Plus I have my own (“internal”) WEB and EJB components.

    I have created Enterprise application project and included internal components as modules
    and manually added external to my application.xml

    Every time I do fresh exploded deployment MyEclipse strips out “.jar” even for “external” entries.

    What is the right way of doing this anyway?

    #221281 Reply

    Here is other issue.

    If I update application.xml manually it is automatically copied to deployment directory, but extensions for internal modules are not removed. As if I have packaged deployment, not exploded one.

    #221310 Reply

    Scott Anderson
    Participant

    Its seems like you both have similar questions so I’ll answer leonidr’s questions and they should be applicable to both.

    1. I want to link to already packaged utility jars instead of copying them into APP-INF/lib directory under MyEclipse EAR project., because utility jars are externally updated and I want to use updated ones every time deployment is done.
    2. I am not able to update manifest of already packaged EJBs to make it use utility jars deployed in EAR root.

    1) In your MyEclipse EAR project, use the File > New > Folder wizard to create the APP-INF/lib directory if it doesn’t already exist.
    2) Select the lib directory and select File > New File. In the wizard dialog, click the Advanced button and check the box that says “Link to file in the file system”. Then, point to the jar you want to include. Repeat this for each externally packaged jar.

    #221361 Reply

    In my case “external” jars are J2EE modules not a shared libraries, so they have to be included in application.xml as modules.
    I’m including them manually? Is it ho it is supposed to be?
    And in my case they should be located on the same level as “internal” J2EE modules, in the root of Enterprise application, not in lib directory.
    Anyway during deployment their names still geting extensions cut of, link or not.

    #221400 Reply

    Scott Anderson
    Participant

    In my case “external” jars are J2EE modules not a shared libraries, so they have to be included in application.xml as modules.
    I’m including them manually? Is it ho it is supposed to be?
    And in my case they should be located on the same level as “internal” J2EE modules, in the root of Enterprise application, not in lib directory.

    Yes, packaged resources must be included manually into your EAR, just like a library. You can place the external J2EE modules (.jar or .war) directly into the root of the EAR project, rather than in WEB-INF/lib, using the same technique of linking them to an external filesystem location. However, you will have to update application.xml manually to add the new modules. Also, please note that if you later use the MyEclipse > Add / Remove Modules…. dialog, your custom application.xml will be overwritten when the dialog closes. So, if you choose to manage your own application.xml, you should refrain from using the automated techniques.

    Anyway during deployment their names still geting extensions cut of, link or not.

    For exploded deployment of projects in the workspace, this is expected since WebLogic does not expect directories containing exploded deployments to contain packaging suffixes. However, your packaged deployments will have the appropriate suffixes in the final .ear file so that it will work properly.

    #221499 Reply

    leonidr
    Member

    <Quote> Select the lib directory and select File > New File. In the wizard dialog, click the Advanced button and check the box that says “Link to file in the file system”. Then, point to the jar you want to include. Repeat this for each externally packaged jar.</Quote>

    Eclipse 3.0 allows linked resources
    only under projrct root, thus linking to external jar under APP-INF/lib will be problematic.

    #221502 Reply

    Scott Anderson
    Participant

    Eclipse 3.0 allows linked resources
    only under projrct root, thus linking to external jar under APP-INF/lib will be problematic.

    You’re absolutlely correct. I forget about that restriction. In that case, you’ll have to physically copy the archives into the EAR project periodically, as they are updated externally.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Deploying existing WAR and EJB Jars

You must be logged in to post in the forum log in