0 Replies Latest reply on Oct 12, 2005 6:34 PM by ryan dewell

    EAR granularity and deployment best practice (?)

    ryan dewell Novice

      Hello, new to J2EE, and I have a deployment question.

      We have two primary web applications: A and B. Each web application has its own release cycle. For example, A will be updated quite a bit more frequently than B. Therefore, we will package and deploy A and B in their own separate EARs. The EARs may or may not be deployed on the same server.

      However, both A and B share a set of common / core code. This code is packaged separately as a PAR and contains all of the entities, and any other EJBs common to both applications.

      So there are basically 3 sets of code. The web applications A and B, and the common core code which contains the entities. A and B are dependent on the core code, but are not dependent on each other.

      The way I see it there are 3 possible scenarios:
      1) I've been packaging up A.ear and B.ear with the PAR containing the core code duplicated inside each EAR. This seems to work OK. But, does it make more sense to stick the core entity beans and code (PAR) into its own deployment archive, separate from A.ear and B.ear? If so, how would this look??
      2) Or, should I just keep it the way it is? Does that introduce any problems to have the same entity beans (PARs) deployed into two completely different EARs, while sharing the same datasource?
      3) Or, should I give up the idea of separate release cycles for A and B, and since they share common code and entities, stuff them all into one big EAR?

      Thanks for any insight,

      Ryan