web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Chapter 12 12The VisiClient Container Chapter Important VisiClient is a container that provides a J2EE environment for services for application clients. Containers are an integral part of J2EE applications. Most applications provide containers for each application type. Application clients depend on their containers to supply system services to all J2EE components. For documentation updates, go to www.borland.com/techpubs/bes. Application Client architecture J2EE application clients are first tier client programs that execute in their own Java virtual machines. Application clients obey the model for Java technology-based applications, in that they are invoked at their main method and run until the virtual machine is terminated. Like other J2EE application components, application clients depend on a container to provide system services; though in the case of application clients, these services are limited. Figure 12.1 VisiClient architecture Chapter 12: The VisiClient Container 97

Application Client architecture Packaging and deployment Deploying the application client components into a VisiClient container requires the specification of deployment descriptors using XML. (Refer to J2EE 1.3 Specification for more information about application clients, and their deployment into a J2EE 1.3 compliant container.) Application clients are packaged in JAR files and include a deployment descriptor (similar to other J2EE application components). The deployment descriptor defines the EJB and the external resources referenced by the application. You can use the Borland Enterprise Server Deployment Descriptor Editor for packaging and editing application client components. For more information, go to the User’s Guide. The deployment descriptor is necessary because there are a number of functions that must be configured at deployment time, such as assigning names to EJBs and their resources. The minimum requirements for deployment of an application client into a VisiClient container are: ■ ■ All the client-side classes are packaged into a JAR. See below section on required client JARs and files. A well-formed JAR should have the following: ■ ■ Application specific classes including the class containing the application entry point (main class) The JAR file must have a META-INF subdirectory with the following: ■ A manifest file ■ A standard XML file (application-client.xml), as required by J2EE 1.3 specifications ■ A vendor-specific XML file (application-client-borland.xml) RMI-IIOP stubs which can also be packaged separately. In this case, the file needs the classpath attribute of the manifest file set to the appropriate value. The JAR formed in this manner is deployable to a standalone container or to an EAR file. The following sections in this chapter describe this process in detail. Benefits of the VisiClient Container VisiClient offers users a range of benefits from the use of J2EE applications. These include: ■ ■ Client code portability: Applications can use logical names (as recommended in the J2EE specifications) to access resources such as database connections, remote EJBs and environment variables. The container, per the J2EE specification, exposes the resources as administered objects in the local JNDI namespace (java:comp/env). JDBC Connection Pooling: Client applications in Borland Enterprise Server can use JDBC 2-based datasources (factories). VisiClient Container provides connection pooling to client applications in the Server that employ a JDBC 2-based datasource. For example, the VisiClient container's application uses java.net.URL, JMS, and Mail factories. Datasource and URL factories are deployed in the in-process local JNDI subcontext that resides in the client container virtual machine on startup. Other res-ref-types (such as JMS and Mail) are configured and deployed using the relevant tools from the vendor of these products. Refer to the Deployment, Datasources and Transaction chapters of the Borland Enterprise Server Developer's Guide for more information about configuration and deployment. 98 BES Developer’s Guide

Chapter<br />

12<br />

12The VisiClient Container<br />

Chapter<br />

Important<br />

VisiClient is a container that provides a J2EE environment for services for application<br />

clients.<br />

Containers are an integral part of J2EE applications. Most applications provide<br />

containers for each application type. Application clients depend on their containers to<br />

supply system services to all J2EE components.<br />

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

Application Client architecture<br />

J2EE application clients are first tier client programs that execute in their own Java<br />

virtual machines. Application clients obey the model for Java technology-based<br />

applications, in that they are invoked at their main method and run until the virtual<br />

machine is terminated. Like other J2EE application components, application clients<br />

depend on a container to provide system services; though in the case of application<br />

clients, these services are limited.<br />

Figure 12.1<br />

VisiClient architecture<br />

Chapter 12: The VisiClient Container 97

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

Saved successfully!

Ooh no, something went wrong!