Package org.eclipse.persistence.eis
Class EISConnectionSpec
- java.lang.Object
-
- org.eclipse.persistence.eis.EISConnectionSpec
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Connector
public class EISConnectionSpec extends java.lang.Object implements Connector
An
EISConnectionSpecspecifies how thejavax.resource.cci.Connectionis accessed. There are three ways to connect to an EIS datasource through JCA:- Provide a JNDI name to the ConnectionFactory and use the default getConnection
- Provide a JNDI name to the ConnectionFactory, and a driver specific ConnectionSpec to pass to the getConnection
- Connect in a non-managed way directly to the driver specific ConnectionFactory
- See Also:
EISLogin, Serialized Form- Author:
- James
- Since:
- OracleAS TopLink 10g (10.0.3)
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.resource.cci.ConnectionFactoryconnectionFactoryprotected javax.resource.cci.ConnectionSpecconnectionSpecprotected javax.naming.Contextcontextprotected java.io.Writerlogprotected javax.naming.Namenamestatic java.lang.StringPASSWORDstatic java.lang.StringUSER
-
Constructor Summary
Constructors Constructor Description EISConnectionSpec()PUBLIC: Construct a EISConnectionSpec with no settings.EISConnectionSpec(java.lang.String name)PUBLIC: Construct a EISConnectionSpec with the specified settings.EISConnectionSpec(javax.naming.Context context, java.lang.String name)PUBLIC: Construct a EISConnectionSpec with the specified settings.EISConnectionSpec(javax.naming.Context context, javax.naming.Name name)PUBLIC: Construct a EISConnectionSpec with the specified settings.EISConnectionSpec(javax.naming.Name name)PUBLIC: Construct a EISConnectionSpec with the specified settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()INTERNAL: Clone the connector.java.sql.Connectionconnect(java.util.Properties properties, Session session)INTERNAL: Required for interface, but never used, for JDBC.javax.resource.cci.ConnectionconnectToDataSource(EISAccessor accessor, java.util.Properties properties)Connect with the specified properties and return the Connection.java.lang.StringgetConnectionDetails()PUBLIC: Provide the details of my connection information.javax.resource.cci.ConnectionFactorygetConnectionFactory()PUBLIC: Return the javax.resource.cci.ConnectionFactory.javax.resource.cci.ConnectionSpecgetConnectionSpec()PUBLIC: Return the javax.resource.cci.ConnectionSpec.javax.naming.ContextgetContext()PUBLIC: Return the JNDI Context that can supplied the named ConnectionFactory.java.io.WritergetLog()PUBLIC: Returns the attunity adapter message log.javax.naming.NamegetName()PUBLIC: Return the name of the ConnectionFactory within the JNDI Context.java.lang.StringgetPasswordFromProperties(java.util.Properties properties)INTERNAL: Retrieve the password property from the supplied Properties objectvoidsetConnectionFactory(javax.resource.cci.ConnectionFactory connectionFactory)PUBLIC: Set the javax.resource.cci.ConnectionFactory.voidsetConnectionFactoryObject(java.lang.Object connectionFactory)PUBLIC: Set the javax.resource.cci.ConnectionFactory.voidsetConnectionSpec(javax.resource.cci.ConnectionSpec connectionSpec)PUBLIC: Set the javax.resource.cci.ConnectionSpec.voidsetConnectionSpecObject(java.lang.Object connectionFactory)PUBLIC: Set the javax.resource.cci.ConnectionSpec.voidsetContext(javax.naming.Context context)PUBLIC: Set the JNDI Context that can supply the named ConnectionFactory.voidsetLog(java.io.Writer log)PUBLIC: Sets the attunity adapter message log.voidsetName(java.lang.String name)PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.voidsetName(javax.naming.Name name)PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.java.lang.StringtoString()PUBLIC: Print data source info.voidtoString(java.io.PrintWriter writer)INTERNAL: Print something useful on the log.
-
-
-
Field Detail
-
USER
public static final java.lang.String USER
- See Also:
- Constant Field Values
-
PASSWORD
public static final java.lang.String PASSWORD
- See Also:
- Constant Field Values
-
connectionSpec
protected javax.resource.cci.ConnectionSpec connectionSpec
-
connectionFactory
protected javax.resource.cci.ConnectionFactory connectionFactory
-
context
protected javax.naming.Context context
-
name
protected javax.naming.Name name
-
log
protected java.io.Writer log
-
-
Constructor Detail
-
EISConnectionSpec
public EISConnectionSpec()
PUBLIC: Construct a EISConnectionSpec with no settings. The ConnectionFactory name will still need to be set.
-
EISConnectionSpec
public EISConnectionSpec(javax.naming.Context context, java.lang.String name) throws ValidationExceptionPUBLIC: Construct a EISConnectionSpec with the specified settings.- Throws:
ValidationException
-
EISConnectionSpec
public EISConnectionSpec(java.lang.String name) throws ValidationExceptionPUBLIC: Construct a EISConnectionSpec with the specified settings.- Throws:
ValidationException
-
EISConnectionSpec
public EISConnectionSpec(javax.naming.Context context, javax.naming.Name name)PUBLIC: Construct a EISConnectionSpec with the specified settings.
-
EISConnectionSpec
public EISConnectionSpec(javax.naming.Name name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.
-
-
Method Detail
-
getLog
public java.io.Writer getLog()
PUBLIC: Returns the attunity adapter message log.
-
setLog
public void setLog(java.io.Writer log)
PUBLIC: Sets the attunity adapter message log.
-
clone
public java.lang.Object clone()
INTERNAL: Clone the connector.
-
connect
public java.sql.Connection connect(java.util.Properties properties, Session session)INTERNAL: Required for interface, but never used, for JDBC.
-
connectToDataSource
public javax.resource.cci.Connection connectToDataSource(EISAccessor accessor, java.util.Properties properties) throws DatabaseException, ValidationException
Connect with the specified properties and return the Connection.- Throws:
DatabaseExceptionValidationException
-
getContext
public javax.naming.Context getContext()
PUBLIC: Return the JNDI Context that can supplied the named ConnectionFactory.
-
getPasswordFromProperties
public java.lang.String getPasswordFromProperties(java.util.Properties properties)
INTERNAL: Retrieve the password property from the supplied Properties object
-
getConnectionFactory
public javax.resource.cci.ConnectionFactory getConnectionFactory()
PUBLIC: Return the javax.resource.cci.ConnectionFactory.
-
getConnectionSpec
public javax.resource.cci.ConnectionSpec getConnectionSpec()
PUBLIC: Return the javax.resource.cci.ConnectionSpec.
-
getName
public javax.naming.Name getName()
PUBLIC: Return the name of the ConnectionFactory within the JNDI Context.
-
getConnectionDetails
public java.lang.String getConnectionDetails()
PUBLIC: Provide the details of my connection information. This is primarily for JMX runtime services.- Specified by:
getConnectionDetailsin interfaceConnector- Returns:
- java.lang.String
-
setContext
public void setContext(javax.naming.Context context)
PUBLIC: Set the JNDI Context that can supply the named ConnectionFactory.
-
setConnectionFactory
public void setConnectionFactory(javax.resource.cci.ConnectionFactory connectionFactory)
PUBLIC: Set the javax.resource.cci.ConnectionFactory.
-
setConnectionFactoryObject
public void setConnectionFactoryObject(java.lang.Object connectionFactory)
PUBLIC: Set the javax.resource.cci.ConnectionFactory.
-
setConnectionSpec
public void setConnectionSpec(javax.resource.cci.ConnectionSpec connectionSpec)
PUBLIC: Set the javax.resource.cci.ConnectionSpec. This is only required if the default getConnection() on the connection factory is not used. This must be set to the EIS adapter specific connection spec.
-
setConnectionSpecObject
public void setConnectionSpecObject(java.lang.Object connectionFactory)
PUBLIC: Set the javax.resource.cci.ConnectionSpec. This is only required if the default getConnection() on the connection factory is not used. This must be set to the EIS adapter specific connection spec.
-
setName
public void setName(java.lang.String name) throws ValidationExceptionPUBLIC: Set the name of the ConnectionFactory within the JNDI Context.- Throws:
ValidationException
-
setName
public void setName(javax.naming.Name name)
PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.
-
toString
public java.lang.String toString()
PUBLIC: Print data source info.- Overrides:
toStringin classjava.lang.Object
-
-