Discussions

General J2EE: How to configure and deploy multiple ear files in weblogic8.1

  1. Hello all,

    We have an application that is huge and will now be maintained and enhanced by various teams.

    We would like to break down this application into various differnt ears and still have it work as a single cohesive application.

    So common classes including the ejbs will be in a seperate ear, Functionality 1 will be in a seperate ear and functionality 2 will be in a seperate ear and functionality n will also be in its own ear.
    Further more each ear will be talking to each other.

    During maintaince for functionality 1 we will not bring down the whole site but just redeploy the ear 1.

    So my question is
    Can this be done in weblogic and if yes how?

    thanks
    ashish
  2. I think your approach should be reconsidered. If it's important for each team to have separate deployment artifacts (ears), yet rely on a common set of dependencies - I would not use .ears at all. WLS 8.1 (and previous versions) allow you to deploy EJB jars independently. Unfortunately this means you must manually control the CLASSPATH that WLS uses at start up.

    There are many deployment and runtime advantages to using a single comprehensive .ear, but by using multiple ears you've given up many of the benefits. Another side effect is that each .ear will have it's on classloader (more memory consumed) and EJBs that communicate across .ears will be called by value, not reference (slower performance due to increased I/O).

    If you do insist on multiple ears, each ear must contain the same set of common classes. As I said earlier, each ear has it's own exclusive classloader (and classpath). This is also harder to maintain, as you must keep the common libaries in sync across ears, else risk serialization problem.

    You should weigh in all these factors before deciding.

    -Sean
  3. Well said Sean. Take advantage of a SOA in your complex Java apps.
  4. driver Ear with separate wars[ Go to top ]

    Thanks for your input guys.

     How about if i deploy them as seperate wars that talk to a driver ear.


    ashish