To package an Enterprise Connector that uses the ECBO API, compile the five Java classes. Then create a resource adapter using the Java Connector Architecture and include the five classes and the ECBO library in the RAR file for the resource adapter.
To see how the sample ECBO 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 the Sun GlassFish Mobility Platform installation bundle was unzipped:
ds-jcr-musicdb.rar |
ds-jcr-siebel-eway.rar |
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 ECBO Enterprise Connectors.
The same Enterprise Connector works equally well in a one-tier or two-tier Sun GlassFish Mobility Platform installation. (See Sun GlassFish Mobility Platform Architecture in Sun GlassFish Mobility Platform 1.1 Architectural Overview for details on these two types of installation.) Deploy the Enterprise Connector to the Enterprise Server domain that contains your Sun GlassFish Mobility Platform installation. You can use the Enterprise Server Administration Console or the asadmin command to deploy the Enterprise Connector.
In a two-tier Sun GlassFish Mobility Platform installation, an ECBO Enterprise Connector is deployed on the second tier, as shown in Figure 1–2. In this situation, communication between the Gateway and the Enterprise Connector goes through a web service. The Gateway communicates with the web service client. The web service client communicates with the web service endpoint using SOAP/HTTP(S). Finally, the web service endpoint communicates with the Enterprise Connector.
The Enterprise Connector in the figure represents both an ECBO Enterprise Connector and a JAX-RS Enterprise Connector. In a Sun GlassFish Mobility Platform installation, both an ECBO Enterprise Connector and a JAX-RS Enterprise Connector are deployed by default. In this figure, the client application on the mobile device does the following:
Uses the MCBO API to synchronize data with the ECBO Enterprise Connector
Uses the JerseyME API to communicate with the JAX-RS Enterprise Connector to retrieve dynamic data, separate from the synchronized data
You can deploy an ECBO Enterprise Connector in either a single-tier or a two-tier Sun GlassFish Mobility Platform installation. In order to use an ECBO Enterprise Connector remotely, however, you must deploy it in a two-tier installation, because remote use of an ECBO Enterprise Connector requires the Web Services Connector endpoint to communicate between the Gateway and the remote Enterprise Connector.
To configure your deployed Enterprise Connector, use the Sun GlassFish Mobility Platform Administration Console. For details, see Deploying and Configuring an ECBO Enterprise Connector.