jsr342-experts@javaee-spec.java.net

[jsr342-experts] Re: War vs EAR packaging

From: Werner Keil <werner.keil_at_gmail.com>
Date: Wed, 29 Aug 2012 16:06:05 +0200

Antonio/all,

Thanks for the observation. While we had only 2 goals of Tomcat/Jetty and
WebLogic for different stages of a project last year, some special things
required a mandatory packaging to an EAR at least in WLS to avoid classpath
issues between different libraries.

Thus what we discussed under the "Modularity" keyword a few times, some
limited form of library isolation at least in WLS so far seems to work only
if you use the EAR format.
If JBoss also took some liberty in these areas to introduce better
isolation and a certain level of Modularity within the boundaries of the
current JVMs available, that would be more than welcome.

And if any tweaks were applicable to other containers without major impact,
that's sure an idea worth thinking further.

Cheers,

-- 
Werner Keil | JCP Executive Committee Member | Eclipse UOMo Lead
Twitter @wernerkeil | #Java_Social | #EclipseUOMo | #OpenDDR
Skype werner.keil | Google+ gplus.to/wernerkeil
* Eclipse Day Poland: September 13 2012, Krakow, Poland. Werner Keil,
Eclipse Committer, UOMo Lead, Mærsk Build Manager will present "Eclipse
STEM, UOMo and Hudson"
* Chip-to-Cloud Security Forum: September 19 2012, Nice, French Riviera.
Werner Keil, JCP Executive Committee, JSR-321 EG Member will present
"Trusted Computing API for Java™"
* Eclipse Day Delft: September 27 2012, Delft, Netherlands. Werner Keil,
Eclipse Committer, UOMo Lead, Mærsk Build Manager will present "Triple-E
class Continuous Delivery with Hudson, Maven and Mylyn"
* JavaOne: September 30-October 4 2012, San Francisco, USA. Werner Keil,  JCP
Executive Committee will represent "Eclipse UOMo, STEM, and JSRs involved
in, e.g. 331 or JCP.next"
On Wed, Aug 29, 2012 at 2:36 PM, Antonio Goncalves <
antonio.goncalves_at_gmail.com> wrote:
> Hi all,
>
> Today I'm working on an existing Java EE 6 application running on JBoss
> 7.1. I was surprised to see an MDB packaged in a war file... and it's
> working ;o)
>
> It looks like JBoss has taken some liberty from the spec and allows MDBs
> (non web profile component) to be packaged in a war instead of an ear. But
> to be honest, I like it. So I'm wondering : when should I use an ear file ?
> The first answer would be "when I want to package several war together". As
> a developper why would I have other constraints ? Why couldn't I package an
> MDB in a war file ? And what about @Remote interfaces in a war file ? Why
> not ?
>
> Are there technical limitations/constraints that can't be solved (on the
> app server implementation side I mean) that would not allow to package any
> component in a war file ? The ear file would just stay to package war files
> (like a russian doll packaging mode).
>
> Any thoughts ?
> Antonio
>