public class JNDIConnector extends Object implements Connector
Modifier and Type | Field and Description |
---|---|
static int |
COMPOSITE_NAME_LOOKUP |
static int |
COMPOUND_NAME_LOOKUP |
protected Context |
context |
protected DataSource |
dataSource |
protected boolean |
isCallbackRegistered |
protected int |
lookupType
Deprecated.
|
protected String |
name |
static int |
STRING_LOOKUP |
static int |
UNDEFINED_LOOKUP |
Constructor and Description |
---|
JNDIConnector()
PUBLIC:
Construct a Connector with no settings.
|
JNDIConnector(Context context,
String name)
PUBLIC:
Construct a Connector with the datasource name.
|
JNDIConnector(DataSource dataSource)
PUBLIC:
Construct a Connector with the datasource object.
|
JNDIConnector(String name)
PUBLIC:
Construct a Connector with the datasource name.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
INTERNAL:
Clone the connector.
|
Connection |
connect(Properties properties,
Session session)
INTERNAL:
Connect with the specified properties and return the Connection.
|
String |
getConnectionDetails()
PUBLIC:
Provide the details of my connection information.
|
Context |
getContext()
PUBLIC:
Return the JNDI Context that can supplied the named DataSource.
|
DataSource |
getDataSource()
PUBLIC:
Return the javax.sql.DataSource.
|
int |
getLookupType()
Deprecated.
As of 2.6.0, replaced by configuration provided by
ServerPlatform.getJNDIConnectorLookupType() |
String |
getName()
PUBLIC:
Return the name of the DataSource within the
JNDI Context.
|
void |
setContext(Context context)
PUBLIC:
Set the JNDI Context that can supply the named DataSource.
|
void |
setDataSource(DataSource dataSource)
PUBLIC:
Set the javax.sql.DataSource.
|
void |
setLookupType(int lookupType)
Deprecated.
As of 2.6.0, replaced by configuration provided by
ServerPlatform.getJNDIConnectorLookupType() |
void |
setName(String name)
PUBLIC:
Set the name of the DataSource within the
JNDI Context.
|
String |
toString()
PUBLIC:
Print data source info.
|
void |
toString(PrintWriter writer)
INTERNAL:
Print something useful on the log.
|
protected DataSource dataSource
protected Context context
protected String name
protected boolean isCallbackRegistered
public static final int UNDEFINED_LOOKUP
public static final int STRING_LOOKUP
public static final int COMPOSITE_NAME_LOOKUP
public static final int COMPOUND_NAME_LOOKUP
@Deprecated protected int lookupType
public JNDIConnector()
public JNDIConnector(Context context, String name) throws ValidationException
ValidationException
public JNDIConnector(String name)
public JNDIConnector(DataSource dataSource)
public Object clone()
public Connection connect(Properties properties, Session session) throws DatabaseException, ValidationException
connect
in interface Connector
DatabaseException
ValidationException
public Context getContext()
public DataSource getDataSource()
public String getName()
public String getConnectionDetails()
getConnectionDetails
in interface Connector
public void setContext(Context context)
public void setDataSource(DataSource dataSource)
public void setName(String name) throws ValidationException
ValidationException
@Deprecated public void setLookupType(int lookupType)
ServerPlatform.getJNDIConnectorLookupType()
lookupType
- @Deprecated public int getLookupType()
ServerPlatform.getJNDIConnectorLookupType()
public String toString()
public void toString(PrintWriter writer)
Copyright © 2017–2020 Eclipse.org - EclipseLink Project. All rights reserved.