views:

626

answers:

3

Supposing that I have a standard EAR file (and the source files that were used to generated it,) what additional processing needs to be done to convert it to an IBM WebSphere "Enhanced EAR"?

Another way to ask this question would be to ask, "What is the difference between an Enhanced EAR and a standard EAR?"

I'm very aware that there is tooling in the Rational development tools (RAD and RSA.) But, for the purpose of this question, I need to accomplish the same task in an automated build (via either Ant or Maven.)

+1  A: 

From their docs:

The server configuration data that you specify in this editor gets embedded within the application itself.

Sounds like they embed the stuff that's usually added via the admin console (e.g., JNDI for data sources and messaging, JAAS for security) into the EAR itself for greater portabililty between servers.

duffymo
+5  A: 

Another way to ask this question would be to ask, "What is the difference between an Enhanced EAR and a standard EAR?"

An enhanced EAR is an EAR with some XML files added to the META-INF directory to configure specific resources at the application, server or cell level (see the IBM Redbook WebSphere Application Server V7: Packaging Applications for Deployment for more details on this).

Table 23-1 of J2EE Packaging, Enhanced EARs, and the Application Server Toolkit (pdf) lists these files:

alt text

The files being located under the META-INF directory, embedding them in a standard EAR from Ant or Maven should be pretty straight forward, just put them in the META-INF before packaging.

If you have to generate these files from scratch (this wouldn't make sense IMHO), then it's really another story and I'm not sure that the structure of these files is publicly available.

Seriously, if you want to use that feature, find a way to generate the files from the WebSphere Enhanced EAR editor. Maybe get a trial version of RAD to evaluate this feature >:) Or contact IBM, I'm sure they will be happy to helpsell you something, even a single license.

UPDATE: IBM provides Ant Tasks for WebSphere that you could also use from Maven using the antrun plugin (this seems to be the preferred way) but I don't think that wsDefaultBindings is exactly what you're looking for, default IBM WebSphere Bindings don't offer the same features than Enhanced EAR - but they might be useful and enough though. Just in case, if you ever decide to use the wsadmin task instead of Enhanced EAR, here is a list of options.

Pascal Thivent
A: 

You can populate the EAR with the required deployment information using the wsDefaultBindings Ant task. Sample scripts here.

McDowell