Class JNDIConnector

  • All Implemented Interfaces:
    Serializable, Cloneable, Connector

    public class JNDIConnector
    extends Object
    implements Connector
    Specifies the J2EE DataSource lookup options. This connector is normally used with a login in a J2EE environment to connect to a server's connection pool defined by the DataSource name. The JNDI name that the DataSource is registered under must be specified, this must include any required prefix such as "java:comp/env/", (unless a DataSource object is given). A Context is only required if not running on the server, otherwise default to a new InitialContext().
    Since:
    TOPLink/Java 2.1
    Author:
    Big Country
    See Also:
    Serialized Form
    • Constructor Detail

      • JNDIConnector

        public JNDIConnector()
        PUBLIC: Construct a Connector with no settings. The datasource name will still need to be set.
      • JNDIConnector

        public JNDIConnector​(String name)
        PUBLIC: Construct a Connector with the datasource name.
      • JNDIConnector

        public JNDIConnector​(DataSource dataSource)
        PUBLIC: Construct a Connector with the datasource object.