user manual

324 BES Developers Guide
Other Considerations
Other Considerations
Converting a Local Connector to a Remote Connector
VisiConnect is the sole Connector Container which supports
RemoteConnectors. The issue of Remote Connectors is presently outside the
Connectors specifications. As a result, most Resource Adapters available on
the market are implemented as Local Connectors. Therefore, if you have a
requirement to use a Remote Connector, such as:
Migrating a non-J2EE application to J2EE, where it is required to interface
the legacy application to Connectors as a migration step,
Running a non-J2EE application outside the aegis of an Application Server,
where it is required to interface the application with Connectors,
Running CORBA clients/servers which are required to interface with
Connectors,
Partitioning an application environment by host, where, for example, it is
required to run the Connectors layer on a host remote to the Application
layer, or
Working with some other requirements where it is required to access
Connectors outside of J2EE, or remotely, and you do not have a Remote
Connector for the desired EIS, you will need to convert the available Local
Connector to a Remote Connector. Fortunately, this process is very
straightforward and quick to accomplish.
Conversion
The main steps for converting a Local Connector into a Remote Connector
are:
1 Extend the connection factory class of the Local Connector, and have the
extension:
Implement java.rmi.Remote
Throw java.rmi.RemoteException from each method VisiConnect bundles
ready extensions to javax.sql.DataSource and
javax.resource.cci.ConnectionFactory:
com.borland.enterprise.visiconnect.DataSource extends
javax.sql.DataSource to maremoteteable
com.borland.enterprise.visiconnect.cci.ConnectionFactory extends
javax.resource.cci.ConnectionFactoryto make it remote.
2 The VisiConnect Remote Connector Example illustrates how to extend the
connection factory in this fashion, for both CCI and non-CCI cases. This is
available at $installRoot/examples/j2ee/visiremote. As such, if you wish to
make a Resource Adapter with a connection factory implementing
javax.sql.DataSource or javax.resource.cci.ConnectionFactory a Remote
Connector, all you need to do is to use the