user manual
320 BES Developer’s Guide
Application Development Overview
// Create an empty CustomerRecord instance to hold output from
// the execution of an Interaction
CustomerRecord customer = // ... create an instance
// Create a PurchaseOrderRecord instance as an input to the Interaction
// and set properties on this instance. The PurchaseOrderRecord is another
// example of a custom Record
PurchaseOrderRecord purchaseOrder = // ... create an instance
purchaseOrder.setProductName( "..." );
purchaseOrder.setQuantity( "..." );
// ...
// Execute an Interaction that populates the output CustomerRecord instance
boolean crResponse = ix.execute( rsIxSpec, purchaseOrder, customer );
// Check the CustomerRecord
System.out.println( "Customer Name = [" + customer.getName() + "], Customer
ID = [" + customer.getId() +
"], Customer Address = [" + customer.getAddress() + "]" );
Deployment Descriptors for Application Components
The application component deployment descriptors need to specify
connection factory information for the Resource Adapter which the component
will use. Appropriate entries are required in:
1 In the component's Sun standard deployment descriptor. For example, in
ejb-jar.xml, the following is required:
■
res-ref-name: shme/shmeAdapter
■
res-type: javax.resource.cci.ConnectionFactory
■
res-auth: Application | Container
2 In addition, any version specific entries can be included. For example, EJB
2.0's res-sharing-scope:
■
res-sharing-scope: Shareable | Unshareable
3 In the component's Borland-specific deployment descriptor. For example, in
ejb-borland.xml, the following is required:
■
res-ref-name: shme/shmeAdapter
■
res-type: javax.resource.cci.ConnectionFactory
4 In addition, any version specific entries can be included. For example, EJB
1.1's cmp-resource:
■
cmp-resource: True | False
The following details example deployment descriptors for two EJBs - the first
written to the EJB 2.0 spec, the second written to the EJB 1.1 spec. Both the
standard and Borland-specific deployment descriptors are shown. In these
examples, a hypothetical Resource Adapter is referenced.










