Sun GlassFish Mobility Platform 1.1 Administration Guide

Using the Connectors Tab

The sub-tabs in the Connectors tab allow you to configure local and remote Enterprise Connectors (JCR repositories).

For details on creating Enterprise Connectors, see the Sun Glassfish Mobility Platform 1.1 Developer’s Guide for Enterprise Connectors. You can implement an Enterprise Connector by using either the Java API for RESTful Web Services (JAX-RS) or the Enterprise Connector Business Objects (ECBO) API.

An Enterprise Connector is a JCR repository, which is a software module that sits between the Sun GlassFish Mobility Platform Gateway and an EIS/EAI system or a database. It is responsible for executing CRUD operations (create, retrieve, update, and delete) on one or more business objects available in an EIS/EAI system or database. A local Enterprise Connector is available in the same Java Virtual Machine (JVM) as the Sun GlassFish Mobility Platform Gateway; a remote Enterprise Connector runs on a different server and connects with the Sun GlassFish Mobility Platform Gateway by means of a web services interface.

This section describes the following tasks:

Creating, Activating, and Deleting Enterprise Connectors

The Usage sub-tab lists all the current Enterprise Connectors. The Active checkbox is selected for all Enterprise Connectors that have been activated. This section describes how to create, activate, or delete either a local or a remote Enterprise Connectors.

ProcedureTo Create and Activate a New Enterprise Connector

In the Local Enterprise Connectors panel or the Remote Enterprise Connectors panel, follow these steps.

  1. In the Name text field, type the name of the Enterprise Connector.

  2. Click Add.

    The new Enterprise Connector appears in the list of repositories. The Active checkbox is selected by default, indicating that the Enterprise Connector has been activated.

    A new sub-tab for the Enterprise Connector appears. You can now configure the new Enterprise Connector.

ProcedureTo Delete an Enterprise Connector

Before you delete a local Enterprise Connector, delete all users associated with the remote Enterprise Connector you want to delete. See Using the Users Tab for details.

In the Local Enterprise Connectors panel or the Enterprise Connectors panel, perform the following action.

  1. Click the Delete button for the Enterprise Connector you want to delete.

    The sub-tab for the deleted Enterprise Connector no longer appears.

ProcedureTo Activate or Deactivate an Existing Enterprise Connector

In the Local Enterprise Connectors panel or the Remote Enterprise Connectors panel, follow these steps.

  1. Select or deselect the Active checkbox for the Enterprise Connector whose status you wish to change.

  2. Click Save to save your changes.

Configuring Enterprise Connectors

Use the sub-tab for an Enterprise Connector to perform the following tasks:

You can deploy an ECBO API connector either locally or remotely. You deploy a JAX-RS connector as a web application and can access it by setting the uri property (whose value may include localhost if the connector is deployed in same container as the Gateway). JAX-RS connectors are always defined as Local Enterprise Connectors, whether the value of the uri property is localhost or a remote host.

The installer automatically creates three sample Enterprise Connectors, which appear in the Admin Console. One of them, Salesforce, is a JAX-RS connector. The other two are ECBO API connectors; they are created as local Enterprise Connectors in a single-tier installation and as remote Enterprise Connectors in a two-tier installation.

ProcedureTo Configure a Local Enterprise Connector

To add or edit the settings and properties for a local Enterprise Connector, follow these steps.

  1. In the Local Enterprise Connector Properties panel, specify a value for the business-object-provider property (for an ECBO API connector) or the uri property (for a JAX-RS connector).

    This value is the class name of the Enterprise Connector's implementation of the com.sun.mep.connector.api.BusinessObjectProvider class. For MusicDB, for example, the value is com.sun.mep.connector.jdbc.album.MusicAlbumProvider.

  2. Click Save in the Local Enterprise Connector Properties panel.

  3. In the Name field of the Local Enterprise Connector Settings panel, edit the name of the Enterprise Connector.

    The Name field contains the name of the Enterprise Connector that was specified when it was created.

  4. In the Class/JNDI Name field for a local Enterprise Connector, type or edit the class name or JNDI name of the Enterprise Connector.

    If the connector is packaged as a Resource Adapter, you normally specify the JNDI name. If it is packaged in a JAR file, you specify the class, which is typically com.sun.mep.connector.jcr.DbRepository.

  5. In the Workspace Name field, type or edit the name of the workspace for the Enterprise Connector.

    For a JAX-RS connector, the workspace name does not matter. (In the sample connector, it is default.) For a connector that uses the ECBO API, the workspace name should be the same as the name specified for the workspace element in the resource file for the Enterprise Connector.

    The other fields in this panel (Remote DB Name, Content Type, Register With URL, and Default URL) are not used for Sun GlassFish Mobility Platform.

  6. Click Save in the Local Enterprise Connector Settings panel.

ProcedureTo Configure a Remote Enterprise Connector

To add or edit the settings and properties for a remote Enterprise Connector, follow these steps.

  1. In the Remote Enterprise Connector Properties panel, specify values for the properties used by the remote Enterprise Connector.

    The following table shows the properties and values that are normally specified.

    Name 

    Value 

    ws.request.timeout

    60s

    jndi.name

    JNDI name of connector (for example, mep/musicdb)

    ws.cache.ttl

    5m

    business-object-provider

    com.sun.mep.connector.jdbc.album.MusicAlbumProvider (or the equivalent class for your Enterprise Connector)

    ws.coalesce.max

    5

    ws.cache.spanSessions

    false

    ws.connect.timeout

    60s

    ws.endpoint.url

    http://hostname:port-value/ds-jcr-webservice-server/SynchronicaUDCService

    ws.coalesce.period

    20ms

  2. Click Save in the Remote Enterprise Connector Properties panel.

  3. In the Name field of the Remote Enterprise Connector Settings panel, edit the name of the Enterprise Connector.

    The Name field contains the name of the Enterprise Connector that was specified when it was created.

  4. In the WS Endpoint URL field, type or edit the URL of the web service through which you access the remote Enterprise Connector.

    This URL has the following format:

    http://hostname:port-value/ds-jcr-webservice-server/SynchronicaUDCService

    where hostname is the name of the remote system, and port-value is the HTTP port (usually 8080 or 8181).

  5. In the Workspace Name field, type or edit the name of the workspace for the Enterprise Connector.

    The workspace name should be the same as the name specified for the workspace element in the resource file for the Enterprise Connector.

    The other fields in this panel (Remote DB Name, Content Type, Register With URL, and Default URL) are not used for Sun GlassFish Mobility Platform.

  6. Click Save in the Remote Enterprise Connector Settings panel.