Skip Headers

# Accessing a Data Source by Port

Previous

Next

If your TopLink-enabled application accesses a data source using a socket, then grant `connect` and `resolve` permissions for that socket as Example: Permissions for non-J2EE Data Source Connections shows. This example assumes that the host name (or IP address) of the remote host that provides the data source (such as a relational database server host) is given by application-specific system property `remote.data.source.host` and that this host accepts data source connections on port 1025.

Permissions for non-J2EE Data Source Connections

    permission java.net.SocketPermission "${remote.data.source.host}:1025-", "connect, resolve";

For J2EE applications, data source socket permissions are usually handled by the application server.