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.

Application Client architecture<br />

Packaging and deployment<br />

Deploying the application client components into a VisiClient container requires the<br />

specification of deployment descriptors using XML. (Refer to J2EE 1.3 Specification for<br />

more information about application clients, and their deployment into a J2EE 1.3<br />

compliant container.)<br />

Application clients are packaged in JAR files and include a deployment descriptor<br />

(similar to other J2EE application components). The deployment descriptor defines the<br />

EJB and the external resources referenced by the application. You can use the <strong>Borland</strong><br />

Enterprise Server Deployment Descriptor Editor for packaging and editing application<br />

client components. For more information, go to the User’s Guide.<br />

The deployment descriptor is necessary because there are a number of functions that<br />

must be configured at deployment time, such as assigning names to EJBs and their<br />

resources. The minimum requirements for deployment of an application client into a<br />

VisiClient container are:<br />

■<br />

■<br />

All the client-side classes are packaged into a JAR. See below section on required<br />

client JARs and files. A well-formed JAR should have the following:<br />

■<br />

■<br />

Application specific classes including the class containing the application entry<br />

point (main class)<br />

The JAR file must have a META-INF subdirectory with the following:<br />

■<br />

A manifest file<br />

■<br />

A standard XML file (application-client.xml), as required by J2EE 1.3<br />

specifications<br />

■<br />

A vendor-specific XML file (application-client-borland.xml)<br />

RMI-IIOP stubs which can also be packaged separately. In this case, the file needs<br />

the classpath attribute of the manifest file set to the appropriate value. The JAR<br />

formed in this manner is deployable to a standalone container or to an EAR file. The<br />

following sections in this chapter describe this process in detail.<br />

Benefits of the VisiClient Container<br />

VisiClient offers users a range of benefits from the use of J2EE applications. These<br />

include:<br />

■<br />

■<br />

Client code portability: Applications can use logical names (as recommended in<br />

the J2EE specifications) to access resources such as database connections, remote<br />

EJBs and environment variables. The container, per the J2EE specification,<br />

exposes the resources as administered objects in the local JNDI namespace<br />

(java:comp/env).<br />

JDBC Connection Pooling: Client applications in <strong>Borland</strong> Enterprise Server can<br />

use JDBC 2-based datasources (factories). VisiClient Container provides<br />

connection pooling to client applications in the Server that employ a JDBC 2-based<br />

datasource. For example, the VisiClient container's application uses java.net.URL,<br />

JMS, and Mail factories.<br />

Datasource and URL factories are deployed in the in-process local JNDI subcontext<br />

that resides in the client container virtual machine on startup. Other res-ref-types (such<br />

as JMS and Mail) are configured and deployed using the relevant tools from the vendor<br />

of these products. Refer to the Deployment, Datasources and Transaction chapters of<br />

the <strong>Borland</strong> Enterprise Server Developer's Guide for more information about<br />

configuration and deployment.<br />

98 BES Developer’s Guide

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

Saved successfully!

Ooh no, something went wrong!