12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

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.

Creating and Deploying a DAR<br />

You deploy the DAR containing the descriptor file just as you would any other J2EE<br />

module using either the Console or command-line utilities, or as part of an EAR. You<br />

can deploy any number of distinctly named DARs in the same Partition or to a BES<br />

cluster. Should two or more deployed DARs have resource object definitions with<br />

identical JNDI names, the last deployed module overwrites any existing object binding<br />

on the same node.<br />

Once deployed, resource objects defined in the DAR can be examined in the Naming<br />

Service namespace using the JNDI Browser. See Chapter 9, “Using the JNDI Browser”<br />

for details on using the browser.<br />

Migrating to DARs from previous versions of <strong>Borland</strong> Enterprise<br />

Server<br />

Previous product versions, including IAS 4.1 and BAS 4.5, did not have a DAR module<br />

to contain the jndi-definitions.xml descriptor. If you have a customized jndidefinitions.xml<br />

file that needs to be transferred to <strong>Borland</strong> Enterprise Server, follow<br />

these migration steps:<br />

1 If you want the entire contents of the default resources overridden, make a<br />

temporary directory called META-INF and place your existing jndi-definitions.xml file<br />

within it.<br />

2 Open a command window and use the following jar command:<br />

prompt>jar uvMf default-resources.dar META-INF/jndi-definitions.xml<br />

3 Now deploy this module following the usual procedures.<br />

If you have performed only a few customizations on your old jndi-definitions.xml file<br />

then it may be easier to simply move the appropriate XML stanzas from the old file into<br />

the one contained within the pre-deployed DAR.<br />

Creating and Deploying a DAR<br />

The DDEditor walks you through creating a new JNDI Definitions Module. Open the<br />

DDEditor and select “File|New...” The Object Gallery appears.<br />

Figure 21.1<br />

Object Gallery<br />

Select the JNDI Definitions tab and select JNDI Definitions Archive to create a new<br />

DAR. Click OK. You may now add JDBC datasources or add JMS resources. Or, you<br />

may do this later. When you are finished save the module by choosing “File|Save...”.<br />

Chapter 21: Connecting to Resources with BES: using the Definitions Archive (DAR) 193

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

Saved successfully!

Ooh no, something went wrong!