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 />

23<br />

23Using JMS<br />

Chapter<br />

Important<br />

Resource related objects such as JMS connection factories and JMS Queue/Topic<br />

destinations are obtained in a portable J2EE mandated way through JNDI. A JMS<br />

resource object is resolved by performing a JNDI lookup of a J2EE Resource<br />

Reference defined in the deployment descriptors of an application component.<br />

Resource Reference definitions involve both standard J2EE and <strong>Borland</strong>'s proprietary<br />

deployment descriptors. In the standard deployment descriptor, a Resource Reference<br />

specifies a logical name relative to the application's JNDI environment naming context,<br />

java:comp/env/. <strong>Borland</strong>'s deployment descriptor complements the standard descriptor<br />

by associating the Resource Reference logical name with the actual JNDI location of<br />

the JMS resource definition. For example, in an EJB Jar component, the standard<br />

J2EE deployment descriptor, ejb-jar.xml, specifies Resource References for an EJB<br />

using a element for a JMS connection factory and <br />

elements for JMS Topics and Queues. In BES, a JNDI lookup of a Resource Reference<br />

involves retrieval of the JMS resource definition from which the desired JMS object is<br />

created and returned to caller of lookup. The property values present in the JMS<br />

resource definition determine the type and characteristics of resource object created.<br />

Before a Resource Reference look up can be attempted, the required resource<br />

definition must first be bound to its physical JNDI location. In BES, JMS resource<br />

definitions are bound into a JNDI service provider during deployment of a Definitions<br />

ARchive (DAR) module. By default, these objects are bound to the partitions Naming<br />

Service, the JNDI CosNaming service provider in BES. This chapter describes how to<br />

define JMS resource object definitions in a DAR module and delves into the details of<br />

how to get a handle to a JMS resource object from a J2EE application. A discussion of<br />

JMS activity and how it relates transactions is also provided.<br />

For documentation updates, go to www.borland.com/techpubs/bes.<br />

Chapter 23: Using JMS 209

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

Saved successfully!

Ooh no, something went wrong!