Class JNDIConnector

java.lang.Object
org.eclipse.persistence.sessions.JNDIConnector
All Implemented Interfaces:
Serializable, Cloneable, Connector
Direct Known Subclasses:
OracleOCIProxyConnector

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().
See Also:
Author:
Big Country
  • Field Details

    • dataSource

      protected DataSource dataSource
    • context

      protected Context context
    • name

      protected String name
    • isCallbackRegistered

      protected boolean isCallbackRegistered
    • UNDEFINED_LOOKUP

      public static final int UNDEFINED_LOOKUP
      See Also:
    • STRING_LOOKUP

      public static final int STRING_LOOKUP
      See Also:
    • COMPOSITE_NAME_LOOKUP

      public static final int COMPOSITE_NAME_LOOKUP
      See Also:
    • COMPOUND_NAME_LOOKUP

      public static final int COMPOUND_NAME_LOOKUP
      See Also:
    • lookupType

      @Deprecated protected int lookupType
      Deprecated.
  • Constructor Details

    • JNDIConnector

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

      public JNDIConnector(Context context, String name) throws ValidationException
      PUBLIC: Construct a Connector with the datasource name.
      Throws:
      ValidationException
    • 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.
  • Method Details