Package org.eclipse.persistence.eis
Class EISConnectionSpec
- java.lang.Object
-
- org.eclipse.persistence.eis.EISConnectionSpec
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Connector
public class EISConnectionSpec extends Object implements Connector
An
EISConnectionSpec
specifies how thejakarta.resource.cci.Connection
is 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)
-
-
Constructor Summary
Constructors Constructor Description EISConnectionSpec()
PUBLIC: Construct a EISConnectionSpec with no settings.EISConnectionSpec(String name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.EISConnectionSpec(Context context, String name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.EISConnectionSpec(Context context, Name name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.EISConnectionSpec(Name name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
INTERNAL: Clone the connector.Connection
connect(Properties properties, Session session)
INTERNAL: Required for interface, but never used, for JDBC.jakarta.resource.cci.Connection
connectToDataSource(EISAccessor accessor, Properties properties)
Connect with the specified properties and return the Connection.String
getConnectionDetails()
PUBLIC: Provide the details of my connection information.jakarta.resource.cci.ConnectionFactory
getConnectionFactory()
PUBLIC: Return the jakarta.resource.cci.ConnectionFactory.jakarta.resource.cci.ConnectionSpec
getConnectionSpec()
PUBLIC: Return the jakarta.resource.cci.ConnectionSpec.Context
getContext()
PUBLIC: Return the JNDI Context that can supplied the named ConnectionFactory.Writer
getLog()
PUBLIC: Returns the attunity adapter message log.Name
getName()
PUBLIC: Return the name of the ConnectionFactory within the JNDI Context.String
getPasswordFromProperties(Properties properties)
INTERNAL: Retrieve the password property from the supplied Properties objectvoid
setConnectionFactory(jakarta.resource.cci.ConnectionFactory connectionFactory)
PUBLIC: Set the jakarta.resource.cci.ConnectionFactory.void
setConnectionFactoryObject(Object connectionFactory)
PUBLIC: Set the jakarta.resource.cci.ConnectionFactory.void
setConnectionSpec(jakarta.resource.cci.ConnectionSpec connectionSpec)
PUBLIC: Set the jakarta.resource.cci.ConnectionSpec.void
setConnectionSpecObject(Object connectionFactory)
PUBLIC: Set the jakarta.resource.cci.ConnectionSpec.void
setContext(Context context)
PUBLIC: Set the JNDI Context that can supply the named ConnectionFactory.void
setLog(Writer log)
PUBLIC: Sets the attunity adapter message log.void
setName(String name)
PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.void
setName(Name name)
PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.String
toString()
PUBLIC: Print data source info.void
toString(PrintWriter writer)
INTERNAL: Print something useful on the log.
-
-
-
Field Detail
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
connectionSpec
protected jakarta.resource.cci.ConnectionSpec connectionSpec
-
connectionFactory
protected jakarta.resource.cci.ConnectionFactory connectionFactory
-
context
protected Context context
-
name
protected Name name
-
log
protected 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(Context context, String name) throws ValidationException
PUBLIC: Construct a EISConnectionSpec with the specified settings.- Throws:
ValidationException
-
EISConnectionSpec
public EISConnectionSpec(String name) throws ValidationException
PUBLIC: Construct a EISConnectionSpec with the specified settings.- Throws:
ValidationException
-
EISConnectionSpec
public EISConnectionSpec(Context context, Name name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.
-
EISConnectionSpec
public EISConnectionSpec(Name name)
PUBLIC: Construct a EISConnectionSpec with the specified settings.
-
-
Method Detail
-
getLog
public Writer getLog()
PUBLIC: Returns the attunity adapter message log.
-
setLog
public void setLog(Writer log)
PUBLIC: Sets the attunity adapter message log.
-
clone
public Object clone()
INTERNAL: Clone the connector.
-
connect
public Connection connect(Properties properties, Session session)
INTERNAL: Required for interface, but never used, for JDBC.
-
connectToDataSource
public jakarta.resource.cci.Connection connectToDataSource(EISAccessor accessor, Properties properties) throws DatabaseException, ValidationException
Connect with the specified properties and return the Connection.- Throws:
DatabaseException
ValidationException
-
getContext
public Context getContext()
PUBLIC: Return the JNDI Context that can supplied the named ConnectionFactory.
-
getPasswordFromProperties
public String getPasswordFromProperties(Properties properties)
INTERNAL: Retrieve the password property from the supplied Properties object
-
getConnectionFactory
public jakarta.resource.cci.ConnectionFactory getConnectionFactory()
PUBLIC: Return the jakarta.resource.cci.ConnectionFactory.
-
getConnectionSpec
public jakarta.resource.cci.ConnectionSpec getConnectionSpec()
PUBLIC: Return the jakarta.resource.cci.ConnectionSpec.
-
getName
public Name getName()
PUBLIC: Return the name of the ConnectionFactory within the JNDI Context.
-
getConnectionDetails
public String getConnectionDetails()
PUBLIC: Provide the details of my connection information. This is primarily for JMX runtime services.- Specified by:
getConnectionDetails
in interfaceConnector
- Returns:
- java.lang.String
-
setContext
public void setContext(Context context)
PUBLIC: Set the JNDI Context that can supply the named ConnectionFactory.
-
setConnectionFactory
public void setConnectionFactory(jakarta.resource.cci.ConnectionFactory connectionFactory)
PUBLIC: Set the jakarta.resource.cci.ConnectionFactory.
-
setConnectionFactoryObject
public void setConnectionFactoryObject(Object connectionFactory)
PUBLIC: Set the jakarta.resource.cci.ConnectionFactory.
-
setConnectionSpec
public void setConnectionSpec(jakarta.resource.cci.ConnectionSpec connectionSpec)
PUBLIC: Set the jakarta.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(Object connectionFactory)
PUBLIC: Set the jakarta.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(String name) throws ValidationException
PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.- Throws:
ValidationException
-
setName
public void setName(Name name)
PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.
-
toString
public String toString()
PUBLIC: Print data source info.
-
toString
public void toString(PrintWriter writer)
INTERNAL: Print something useful on the log.
-
-