Class EISConnectionSpec

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Connector

    public class EISConnectionSpec
    extends java.lang.Object
    implements Connector

    An EISConnectionSpec specifies how the javax.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)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.resource.cci.ConnectionFactory connectionFactory  
      protected javax.resource.cci.ConnectionSpec connectionSpec  
      protected javax.naming.Context context  
      protected java.io.Writer log  
      protected javax.naming.Name name  
      static java.lang.String PASSWORD  
      static java.lang.String USER  
    • 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.Object clone()
      INTERNAL: Clone the connector.
      java.sql.Connection connect​(java.util.Properties properties, Session session)
      INTERNAL: Required for interface, but never used, for JDBC.
      javax.resource.cci.Connection connectToDataSource​(EISAccessor accessor, java.util.Properties properties)
      Connect with the specified properties and return the Connection.
      java.lang.String getConnectionDetails()
      PUBLIC: Provide the details of my connection information.
      javax.resource.cci.ConnectionFactory getConnectionFactory()
      PUBLIC: Return the javax.resource.cci.ConnectionFactory.
      javax.resource.cci.ConnectionSpec getConnectionSpec()
      PUBLIC: Return the javax.resource.cci.ConnectionSpec.
      javax.naming.Context getContext()
      PUBLIC: Return the JNDI Context that can supplied the named ConnectionFactory.
      java.io.Writer getLog()
      PUBLIC: Returns the attunity adapter message log.
      javax.naming.Name getName()
      PUBLIC: Return the name of the ConnectionFactory within the JNDI Context.
      java.lang.String getPasswordFromProperties​(java.util.Properties properties)
      INTERNAL: Retrieve the password property from the supplied Properties object
      void setConnectionFactory​(javax.resource.cci.ConnectionFactory connectionFactory)
      PUBLIC: Set the javax.resource.cci.ConnectionFactory.
      void setConnectionFactoryObject​(java.lang.Object connectionFactory)
      PUBLIC: Set the javax.resource.cci.ConnectionFactory.
      void setConnectionSpec​(javax.resource.cci.ConnectionSpec connectionSpec)
      PUBLIC: Set the javax.resource.cci.ConnectionSpec.
      void setConnectionSpecObject​(java.lang.Object connectionFactory)
      PUBLIC: Set the javax.resource.cci.ConnectionSpec.
      void setContext​(javax.naming.Context context)
      PUBLIC: Set the JNDI Context that can supply the named ConnectionFactory.
      void setLog​(java.io.Writer log)
      PUBLIC: Sets the attunity adapter message log.
      void setName​(java.lang.String name)
      PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.
      void setName​(javax.naming.Name name)
      PUBLIC: Set the name of the ConnectionFactory within the JNDI Context.
      java.lang.String toString()
      PUBLIC: Print data source info.
      void toString​(java.io.PrintWriter writer)
      INTERNAL: Print something useful on the log.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • 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 ValidationException
        PUBLIC: Construct a EISConnectionSpec with the specified settings.
        Throws:
        ValidationException
      • EISConnectionSpec

        public EISConnectionSpec​(java.lang.String name)
                          throws ValidationException
        PUBLIC: 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.
        Specified by:
        clone in interface Connector
        Overrides:
        clone in class java.lang.Object
      • connect

        public java.sql.Connection connect​(java.util.Properties properties,
                                           Session session)
        INTERNAL: Required for interface, but never used, for JDBC.
        Specified by:
        connect in interface Connector
        Returns:
        java.sql.Connection
      • 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:
        getConnectionDetails in interface Connector
        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​(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:
        toString in class java.lang.Object
      • toString

        public void toString​(java.io.PrintWriter writer)
        INTERNAL: Print something useful on the log.
        Specified by:
        toString in interface Connector