Home

 

WebSphere enhanced EAR

WebSphere Application Server v6 also introduced the enhanced EAR feature. The enhanced EAR information, which includes settings for the resources required by the application, is stored in an ibmconfig subdirectory of the enterprise application (EAR file) META-INF directory.

The enhanced EAR feature provides an extension of the Java EE EAR with additional configuration information for resources typically required by Java EE applications. This information is optional, but it can simplify the deployment of applications to Application Server for selected scenarios.

The Enhanced EAR editor can be used to edit several WebSphere Application Server specific configurations, such as JDBC providers, data sources, class loader policies, substitution variables, shared libraries, virtual hosts, and authentication settings. The configuration settings can be made simply within the editor and published with the EAR at the time of deployment.

The upside of the tool is that it makes the testing process simpler and repeatable, because the configurations can be saved to files and then shared within a team's repository. The Enhanced EAR editor cannot configure all runtime settings, but it is very handy to configure the most common settings.

The downside is that the configurations are attached to the EAR, and are not available server- or system-wide. In the WebSphere Administrative Console you can navigate to the enhanced EAR deployment information (select Applications Æ WebSphere enterprise applications, select the application, then click the Application scoped resources link), but you cannot modify the settings. You can only edit settings that belong to the cluster, node, and server contexts.

When you change a configuration using the Enhanced EAR editor, these changes are made within the application context. The deployer can still make changes to the EAR file using the RAD Assembly and Deployment (RAD-AD), but it still requires a separate tool. Furthermore, in most cases these settings are dependent on the node the application server is installed in anyway, so it might not make sense to configure them at the application context for deployment to production.

Table | -1 lists the supported resources that the enhanced EAR provides and the scope in which they are created.

Table 26-1

Scope Resources
Application JDBC providers, data sources, substitution variables, class loader policies
Server Shared libraries
Cell JAAS authentication aliases, virtual hosts

Enhanced EAR resources supported and their scope

To open the Enhanced EAR, right-click an enterprise application and select Java EE Æ Open WebSphere Application Server Deployment .

Figure 26-5 Enhanced EAR: Deployment Descriptor Editor

Figure | -5 displays the JDBC provider (Derby JDBC Provider (XA)), a configured data source (ITSOBANKejb) with properties (databaseName). Select a JDBC provider to see the list of data sources. This example of defining a data source using the Enhanced EAR editor was created in Creating a data source in the enhanced EAR.

Figure | -6 displays the contents of the resources.xml file that is part of the enhanced EAR information stored in:

ibmconfig/cells/defaultCell/applications/defaultApp/deployments/defaultApp

Note that the ibmconfig directory contains the familiar directories for a WebSphere cell configuration. The XML editor of Application Developer displays the configuration contents for the Derby JDBC Provider (XA) and the data source.

Figure 26-6 Enhanced EAR: resources.xml

Note: For more detailed information and an example of using the WebSphere enhanced EAR, refer to these sources:

Packaging applications chapter in the WebSphere Application Server V6.1: Systems Management and Configuration, SG24-7304

IBM WebSphere Application Server v7.0 Info Center, found at:
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp

ibm.com/redbooks