English 中文(简体)
What is the difference between an EAR file and a "WebSphere Enhanced EAR"?
原标题:

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.)

最佳回答

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 http://img46.imageshack.us/img46/6751/table231.png

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.

问题回答

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.

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





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签