42 Lines

The deployment KISS

In this post on the seam framework list I reiterate a point that I think a lot of J2EE folks miss when they're designing apps.

KISS applies to deployments too.

We all love layers and modularisation, but frankly, deployments aren't the place to do it unless you have to do so. If you have completely independent apps, by all means make them separate deployments. But don't make an EJB "my-whizzy-layer-X.jar" which is only used by "my-whizzy-webapp.war" right next to it in "my-completely-superfluous.ear".

There are a whole host of jboss/weblogic/you-name-it classloading issues just waiting to bite you when you start trying to do cross-module dependencies in J2EE. The rules there are complicated for a reason. (Hey, I don't know the reason, but I'm sure the EE JSR committee did.) If this document doesn't make your head explode, you probably already work for redhat.

What's more, the servers themselves don't support partial deployment of pieces in the EAR, nor do they really support long term stability under app reloading at all (albeit due to java classloader permgen space issues beyond their control.)

So Keep It Simple on deployments. If you need inter-deployment calls, use REST or JMS.