Hi,
In our current project under development, we have multiple
J2EE web applications.
The j2EE server chosen in
JBoss 5.x GA
I have question regarding the best packaging structure:
The current practice is
All common functions are packaged into a commons.jar
All web applications are packaged into individual .WAR files and those into individual ,EAR files
The same is then deployed by
Copying the commons.jar into <<jboss-5.1.0.GA>>\server\default\lib
and the multiple EARs (each containing a single WAR) in <<jboss-5.1.0.GA>>\server\default\deploy
JBoss picks up the EAR and explodes it in the default\tmp folder and everything works.
However, this requires JBoss to be restarted only whenever "commons.jar" is updated.
JBoss detects any change in EAR copied into 'deploy' folder deploys automatically, no restart is required.
But, my question is it nessacary to have multiple EAR?
What could be the benefit?
I feel there should be a single EAR fils having everything commons.jar + the multiple WARs
The single EAR when copied into "<<jboss-5.1.0.GA>>\server\default\deploy" should deploy and all web applications work seamlessly.
The only reasoning I could get was the multiple WARs are under development by different teams which have different release dates.
By keeping all WAR's in a single EAR, every time a WAR is to be released, the entire EAR will have to be packaged and deployed.
This could have adverse effect on the other WARs
Another reason was to avoid packaging of the entire EAR (into which could go in a unintended version of a WAR) and deploying it,
And so multiple EARs are being maintained.
Any comments?
thank you.
g1
PS: Tech stack: j2EE,
Struts, Spring, Hibernate and Oracle,
We are using a single JBoss server and not a cluster.
We are employing
Ant and plain eclipse, no Jboss eclipse tools in development