12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter<br />

21<br />

21Connecting to Resources with BES:<br />

Chapter<br />

using the Definitions Archive (DAR)<br />

Note<br />

J2EE specifies a uniform mechanism for establishing connections to resources using<br />

Java standard interfaces. A resource related object containing resource manager<br />

location details and connection attributes is bound under a JNDI service provider, and<br />

can be retrieved by your application as a resource connection factory in a JNDI lookup.<br />

Sample resource connection factories include JDBC datasources and JMS connection<br />

factories. Once a resource connection factory is obtained from JNDI, a connection to<br />

the desired resource manager can then be established. A connection to a relational<br />

database is obtained through a JDBC datasource, a connection to a message broker is<br />

obtained through a JMS connection factory, and general Enterprise Information<br />

Systems (EIS) connections are obtained through JCA resource adapters.<br />

Use the <strong>Borland</strong> Management Console and <strong>Borland</strong> Deployment Descriptor Editor<br />

(DDEditor) to create, edit, and deploy resource connection factories and other resource<br />

related JNDI objects, such as JMS destinations. An XML descriptor file (jndidefinitions.xml),<br />

generally called the JNDI Definitions module, captures the properties<br />

representing resource related objects. This file is packaged in a Data ARchive (DAR)<br />

module.<br />

In BES, a partition hosted Naming Service represents the default JNDI service provider<br />

- its an implementation of a CosNaming service provider. Resource related objects are<br />

bound in the Naming Service of a BES partition through deployment of DAR or RAR<br />

module using standard BES deployment procedures. At that time, only properties<br />

required to create an instance of a resource connection factory, or JMS destination, are<br />

stored in the JNDI bound object. During JNDI lookup for a resource related object, an<br />

instance of the desired resource object is created using the stored property values from<br />

the object retrieved. The newly created instance is then passed back to the caller of<br />

JNDI lookup() method. In this way, DARs can be successfully deployed to a BES<br />

partition without having to load classes for vendor specific resource objects. Class<br />

libraries for resource vendors are only required by application processes that actually<br />

perform JNDI lookup of resource related objects.<br />

In prior versions of BES, a file-system service provider called the Serial Provider was<br />

the default JNDI service provider for deployment of DARs and JNDI Definitions<br />

modules. Resource related objects bound to this provider involved creation of the<br />

resource objects during deployment, and hence required vendor class libraries to be<br />

deployed in advance. In addition, JNDI names for resource related objects required a<br />

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

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

Saved successfully!

Ooh no, something went wrong!