29.01.2013 Views

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If you store property files that need to be changed between different<br />

environments inside the EAR file, you might discover that there are problems<br />

involved with that approach, especially in a clustered environment.<br />

In a clustered environment when an enterprise application is deployed to<br />

<strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong>, it is distributed to each node in the cluster using<br />

the <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> file transfer mechanism. At each node, the<br />

EAR file is expanded and laid out on the file system so that <strong>WebSphere</strong><br />

<strong>Application</strong> <strong>Server</strong> can execute it. This means that a property file included in the<br />

EAR file is automatically replicated to each member of the cluster.<br />

If you then need to make a change to the property file, you either have to do it<br />

manually on each cluster member, which can be error prone, or you do it on the<br />

deployment manager itself and then distribute the updated file to each node<br />

again. However, <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> does not fully expand the<br />

contents of the EAR file to the file system on the deployment manager (it only<br />

extracts from the EAR file the deployment descriptors needed to configure the<br />

application in the <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> cell repository), so the property<br />

file is not readily accessible on the deployment manager. Because of this, you<br />

must manually unpack the EAR file, extract the property file, modify it, and then<br />

re-create the EAR file again and redeploy the application. This is not a<br />

recommended approach.<br />

Another option is to distribute the property files within the EAR, but after<br />

deployment, extract them from the EAR file and place them in a folder separate<br />

from the EAR. An example of a folder name suitable for that is<br />

\config\cells\\configData on the deployment<br />

manager machine. Anything in that folder is replicated to each node in the cell<br />

when <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> synchronizes with the nodes. For the<br />

application to find the file, it must then refer to it on its local file system. But<br />

because that folder name includes both the name of the profile and the name of<br />

the cell, it can quickly become messy and is usually not a good solution.<br />

8.11 Planning for application upgrades in production<br />

To have a production environment that enables you to roll out new versions of<br />

applications while maintaining continuous availability is not only the responsibility<br />

of the <strong>WebSphere</strong> infrastructure architects and system administrators, it is also<br />

the responsibility of the developer. Even though they might not always realize it,<br />

developers play a critical role in making the production environment stable and<br />

highly available. If an application is poorly written or developers introduce<br />

incompatible changes, there might not be much the system administrators can<br />

do but to bring down the whole system for an application upgrade. And<br />

unfortunately, application developers are too often not aware of the impact their<br />

decisions have on the production environment.<br />

Chapter 8. <strong>Application</strong> development and deployment 305

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!