Sun GlassFish Mobility Platform 1.1 Developer's Guide for Enterprise Connectors

Packaging and Deploying JAX-RS Enterprise Connectors

To package an Enterprise Connector that uses the JAX-RS API, compile the Java classes and include them in a WAR file.

To see how the sample JAX-RS Enterprise Connectors provided with Sun GlassFish Mobility Platform are packaged, use the jar command or another utility to view the contents of either of the following files in the gateway subdirectory of the directory where Sun GlassFish Mobility Platform was unzipped:

musicdb-ws.war

salesforce-ws.war

Alternatively, you can see the deployed versions by looking in the applications/j2ee-modules directory of the Enterprise Server domain for Sun GlassFish Mobility Platform.

The Maven plugin for NetBeans IDE makes available a set of Maven archetypes (templates) that you can use to develop JAX-RS Enterprise Connectors.

Figure 1–1 shows the location of a JAX-RS Enterprise Connector in a single-tier installation. The client communicates with the Gateway tier in two different ways: it can use the MCBO API to communicate with the Gateway, or it can use the JerseyME API to communicate directly with the Enterprise Connector using the JAX-RS API. The Gateway communicates with the Enterprise Connector using the JAX-RS API. The Enterprise Connector in turn communicates with a back-end system using an appropriate application protocol.

Figure 1–1 A JAX-RS Enterprise Connector in a Single-tier Sun GlassFish Mobility Platform Installation

A JAX-RS Enterprise Connector in a Single-tier Sun GlassFish Mobility Platform Deployment

In addition, if the back-end system has a RESTful interface, the client can use the JerseyME API to communicate directly with the back-end system.

You can use a JAX-RS Enterprise Connector in either a single-tier or a two-tier Sun GlassFish Mobility Platform installation. You do not need to use a two-tier installation, however, in order to use a JAX-RS Enterprise Connector remotely. You can deploy the Enterprise Connector on a different system from the one where the Gateway is installed, and then configure the Gateway to point to the URL of the system where the Enterprise Connector is deployed.

To configure your deployed Enterprise Connector, use the Sun GlassFish Enterprise Server Administration Console and the Sun GlassFish Mobility Platform Administration Console. For details, see Building, Deploying, and Configuring a JAX-RS Enterprise Connector.