WebLogic Integration


com.bea.adapter.spi
Class AbstractManagedConnectionFactory

java.lang.Object
  |
  +--com.bea.adapter.spi.AbstractManagedConnectionFactory
Direct Known Subclasses:
AbstractBEAManagedConnectionFactory

public abstract class AbstractManagedConnectionFactory
extends java.lang.Object
implements javax.resource.spi.ManagedConnectionFactory, java.io.Serializable

A ManagedConnectionFactory creates physical connections to the underlying EIS for the application server. A physical connection is encapsulated by a ManagedConnection instance. This class encapsulates functionality that is generic across all types of adapters. It provides the following features:

Each instance of this class is configured via a deployment descriptor...TODO Expand on this...

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Field Summary
protected  char[] m_achPassword
          Standard connection parameters; treated as optional
protected  java.beans.PropertyChangeSupport m_changes
           
protected  java.lang.String m_strAdapterDescription
          Basic adapter metadata; these come from a resource bundle
protected  java.lang.String m_strAdapterName
          Basic adapter metadata; these come from a resource bundle
protected  java.lang.String m_strAdapterVendorName
          Basic adapter metadata; these come from a resource bundle
protected  java.lang.String m_strAdapterVersion
          Basic adapter metadata; these come from a resource bundle
protected  java.lang.String m_strAdditionalLogContext
          This value associates "this" with an application component in the runtime environment.
protected  java.lang.String m_strConnectionURL
          Standard connection parameters; treated as optional
protected  java.lang.String m_strCountryCode
          Associates a country code for determining the locale for logging
protected  java.lang.String m_strLanguageCode
          Associates a language code for determining the locale for logging
protected  java.lang.String m_strLogConfigFile
          This value provides the name of the log configuration file
protected  java.lang.String m_strLogLevel
          Log level - warning by default
protected  java.lang.String m_strMessageBundleBase
          Base name for message bundle
protected  java.lang.String m_strPortNumber
          Standard connection parameters; treated as optional
protected  java.lang.String m_strRootLogContext
          Allows for the categorization of log messages for this adapter.
protected  java.lang.String m_strServerName
          Standard connection parameters; treated as optional
protected  java.lang.String m_strUserName
          Standard connection parameters; treated as optional
protected  java.beans.VetoableChangeSupport m_vetos
           
 
Constructor Summary
AbstractManagedConnectionFactory()
          Constructs a managed connection factory instance.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          To support JavaBeans constrained properties
 void addVetoableChangeListener(java.beans.VetoableChangeListener l)
          To support JavaBeans constrained properties
protected  void appendField(java.lang.StringBuffer sb, java.lang.String strPropertyName, java.lang.Object objValue)
           
protected  void assertValidLicense()
          Verifies the existence of a valid license for this adapter; if there is no valid license available, this method throws an exception to prevent the instantiation of a ManagedConnectionFactory object.
protected  void assertValidState()
          Verifies that "this" is in a valid state that allows "this" to perform its factory responsibilities successfully.
protected  ValidationResult checkLicense()
          Returns true if the adapter can locate a valid license in the runtime environment.
protected  boolean checkState()
          Returns true if all the members of this class are set correctly.
protected  boolean compareCharArrays(char[] achMyProperty, char[] achOtherProperty)
          Compares two property arrays for equality.
protected  boolean comparePropertyValues(java.lang.Object myProperty, java.lang.Object otherProperty)
          Compares two properties for equality.
 java.lang.Object createConnectionFactory()
          This method is invoked in the non-managed case.
 java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager connectionManager)
          Creates an EIS-specific connection factory.
protected abstract  java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager connectionManager, java.lang.String strAdapterName, java.lang.String strAdapterDescription, java.lang.String strAdapterVersion, java.lang.String strAdapterVendorName)
          Creates a new instance of a connection factory using the supplied parameters.
 boolean equals(java.lang.Object other)
           
 java.lang.String getAdapterDescription()
           
 java.lang.String getAdapterName()
           
 java.lang.String getAdapterVendor()
           
 java.lang.String getAdapterVersion()
           
 java.lang.String getAdditionalLogContext()
           
 java.lang.String getConnectionURL()
          Retrieves the ConnectionURL; a "standard" connection property as suggested by the J2EE Connector Architecture
 java.lang.String getCountryCode()
           
 java.lang.String getLanguageCode()
           
 java.lang.String getLogConfigFile()
           
protected  LogContext getLogContext()
          Retrieves an object that determines the logging configuration for this instance in the logging framework.
protected  ILogger getLogger()
          Retrieves an object used to log information to.
 java.lang.String getLogLevel()
           
 java.io.PrintWriter getLogWriter()
           
 java.lang.String getMessageBundleBase()
           
 java.lang.String getPassword()
          Retrieves the Password; a "standard" connection property as suggested by the J2EE Connector Architecture
 javax.resource.spi.security.PasswordCredential getPasswordCredential(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info)
          Returns an object that encapsulates a user name and password, gathered from either the JAAS Subject object or the connection request info object.
protected  java.lang.String getPasswordFromRequestInfo(javax.resource.spi.ConnectionRequestInfo info)
          Retrieves the password from the supplied connection request info object.
 java.lang.String getPortNumber()
          Retrieves the PortNumber; a "standard" connection property as suggested by the J2EE Connector Architecture
 java.lang.String getRootLogContext()
           
 java.lang.String getServerName()
          Retrieves the ServerName; a "standard" connection property as suggested by the J2EE Connector Architecture.
 java.lang.String getUserName()
          Retrieves the UserName; a "standard" connection property as suggested by the J2EE Connector Architecture
protected  java.lang.String getUserNameFromRequestInfo(javax.resource.spi.ConnectionRequestInfo info)
          Retrieves the user name from the supplied connection request info object.
 int hashCode()
          Calculates an integer code for use in lookup from hash tables.
protected  boolean hasSameBaseProperties(AbstractManagedConnectionFactory otherMcf)
          Compares all the non-connection related properties provided by com.bea.adapter.spi.AbstractManagedConnectionFactory
protected  boolean hasSameConnectionProperties(AbstractManagedConnectionFactory otherMcf)
          Adapter developers should override this method if they have connection properties other than the standard ones provided by this implementation.
protected  void initAdapterMetaData(java.util.ResourceBundle resourceBundle)
          Retrieves metadata about the resource adapter from a message bundle.
protected  void initializeLogResources()
          Initializes resources needed by this instance to support localized logging after all base member variables have been initialized correctly by the application server.
protected  boolean isValidState()
          The application server creates an instance of this class and then calls the setter methods.
protected  void logInfo()
          Writes information about 'this' instance to the underlying logger as a info message.
 javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info)
          This method gets called by the ConnectionManager to try to find a valid connection in the pool it is managing.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          To support JavaBeans constrained properties
 void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
          To support JavaBeans constrained properties
 void setAdapterDescription(java.lang.String strAdapterDescription)
          Sets the adapter description; this overrides the setting provided by the message bundle for this instance if the adapter_description key is mapped to a value in the message bundle.
 void setAdapterName(java.lang.String strAdapterName)
          Sets the adapter name; this overrides the setting provided by the message bundle for this instance if the adapter_name key is mapped to a value in the message bundle.
 void setAdapterVendor(java.lang.String strAdapterVendor)
          Sets the adapter vendor; this overrides the setting provided by the message bundle for this instance if the adapter_vendor key is mapped to a value in the message bundle.
 void setAdapterVersion(java.lang.String strAdapterVersion)
          Sets the adapter version; this overrides the setting provided by the message bundle for this instance if the adapter_version key is mapped to a value in the message bundle.
 void setAdditionalLogContext(java.lang.String strAdditionalLogContext)
          Sets additional context information for identifying logging configuration.
 void setConnectionURL(java.lang.String strConnectionURL)
          Sets the ConnectionURL for connecting to the underlying EIS.
 void setCountryCode(java.lang.String strCountryCode)
          Sets the country code for enabling I18N log and exception messages from instances of this class.
 void setLanguageCode(java.lang.String strLanguageCode)
          Sets the language code for enabling I18N log and exception messages from instances of this class.
 void setLogConfigFile(java.lang.String strLogConfigFile)
          Sets the name for the log configuration file used by this instance.
 void setLogLevel(java.lang.String strLogLevel)
          Sets the log priority level for 'this' instance.
 void setLogWriter(java.io.PrintWriter out)
           
 void setMessageBundleBase(java.lang.String strMessageBundleBase)
          Sets the base name for the message bundle used by this instance.
 void setPassword(java.lang.String strPassword)
          Sets the Password for connecting to the underlying EIS.
 void setPortNumber(java.lang.String strPortNumber)
          Sets the PortNumber for connecting to the underlying EIS.
 void setRootLogContext(java.lang.String strRootLogContext)
          Sets the root log context for this factory.
 void setServerName(java.lang.String strServerName)
          Sets the ServerName for connecting to the underlying EIS.
 void setUserName(java.lang.String strUserName)
          Sets the UserName for connecting to the underlying EIS.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_vetos

protected java.beans.VetoableChangeSupport m_vetos

m_changes

protected java.beans.PropertyChangeSupport m_changes

m_strRootLogContext

protected java.lang.String m_strRootLogContext
Allows for the categorization of log messages for this adapter.

m_strAdditionalLogContext

protected java.lang.String m_strAdditionalLogContext
This value associates "this" with an application component in the runtime environment.

m_strLogConfigFile

protected java.lang.String m_strLogConfigFile
This value provides the name of the log configuration file

m_strLogLevel

protected java.lang.String m_strLogLevel
Log level - warning by default

m_strMessageBundleBase

protected java.lang.String m_strMessageBundleBase
Base name for message bundle

m_strLanguageCode

protected java.lang.String m_strLanguageCode
Associates a language code for determining the locale for logging

m_strCountryCode

protected java.lang.String m_strCountryCode
Associates a country code for determining the locale for logging

m_strAdapterName

protected java.lang.String m_strAdapterName
Basic adapter metadata; these come from a resource bundle

m_strAdapterDescription

protected java.lang.String m_strAdapterDescription
Basic adapter metadata; these come from a resource bundle

m_strAdapterVersion

protected java.lang.String m_strAdapterVersion
Basic adapter metadata; these come from a resource bundle

m_strAdapterVendorName

protected java.lang.String m_strAdapterVendorName
Basic adapter metadata; these come from a resource bundle

m_strUserName

protected java.lang.String m_strUserName
Standard connection parameters; treated as optional

m_achPassword

protected char[] m_achPassword
Standard connection parameters; treated as optional

m_strServerName

protected java.lang.String m_strServerName
Standard connection parameters; treated as optional

m_strPortNumber

protected java.lang.String m_strPortNumber
Standard connection parameters; treated as optional

m_strConnectionURL

protected java.lang.String m_strConnectionURL
Standard connection parameters; treated as optional
Constructor Detail

AbstractManagedConnectionFactory

public AbstractManagedConnectionFactory()
                                 throws javax.resource.ResourceException
Constructs a managed connection factory instance. This method ensures there is a valid license in the runtime environment.

Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to initialize the managed connection factory instance; possibly due to an invalid license.
Method Detail

assertValidLicense

protected void assertValidLicense()
                           throws javax.resource.ResourceException
Verifies the existence of a valid license for this adapter; if there is no valid license available, this method throws an exception to prevent the instantiation of a ManagedConnectionFactory object. Adapter developers should override the checkLicense method to perform the adapter specific license check.

Throws:
javax.resource.spi.ResourceAdapterInternalException - - license verification failed for this adapter.
See Also:
checkLicense method

assertValidState

protected void assertValidState()
                         throws javax.resource.ResourceException
Verifies that "this" is in a valid state that allows "this" to perform its factory responsibilities successfully.

Throws:
javax.resource.ResourceException - if an error occurs while determining if this object is in a valid state; which may result from initializing the log resources needed by this instance.

isValidState

protected boolean isValidState()
                        throws javax.resource.ResourceException
The application server creates an instance of this class and then calls the setter methods. This method checks that all the required properties have been set. This method delegates the "check" of the state of this object to the "checkState" method. This method is called before instances of this class attempt to perform any of its factory responsibilities, such as creating a javax.resource.spi.ConnectionFactory instances or javax.resource.spi.ManagedConnection instances.

Returns:
true if the properties of this object have been set such that it is in a valid state to perform its factory responsibilities; false otherwise.

checkState

protected boolean checkState()
Returns true if all the members of this class are set correctly. Adapter developers should override this method to actually check the state of their concrete class's members. This method will not be called until all of the base class's members have been initialized correctly. Thus, sub-classes can use resources, such as logging, provided by this class.


initializeLogResources

protected void initializeLogResources()
                               throws javax.resource.ResourceException
Initializes resources needed by this instance to support localized logging after all base member variables have been initialized correctly by the application server. We have to support post-constructor initialization because of the JavaBeans approach to initializing instances of this class.

Throws:
javax.resource.ResourceException - if this method fails to initialize the logging framework or message bundle for this instance.

getLogger

protected ILogger getLogger()
                     throws java.lang.IllegalStateException
Retrieves an object used to log information to. This method uses the RootLogContext, AdditionalLogContext, LanguageCode, and CountryCode properties to determine its logger. Adapter developers can override this method to return a logger that is not based solely on the supplied logging context.

Returns:
an object used to log information to.
Throws:
java.lang.IllegalStateException - if the log context is null

getLogContext

protected LogContext getLogContext()
                            throws java.lang.IllegalStateException
Retrieves an object that determines the logging configuration for this instance in the logging framework.

Returns:
an object that determines the logging configuration for this instance.
Throws:
java.lang.IllegalStateException - if the log context is null, i.e. this object has not been initialized correctly.

setLogLevel

public void setLogLevel(java.lang.String strLogLevel)
                 throws javax.resource.ResourceException
Sets the log priority level for 'this' instance. The log priority determines which messages are actually sent to the log at runtime. By default, this value is "WARN" - all messages with severity of WARN or greater are sent to the log.


getLogLevel

public java.lang.String getLogLevel()

Returns:
the log level for this instance. The log level determines whether a message is printed to the log.

setRootLogContext

public void setRootLogContext(java.lang.String strRootLogContext)
                       throws javax.resource.ResourceException
Sets the root log context for this factory. The root log context facilitates the categorization of log messages. In other words, all messages generated by this instance and the other objects it creates, i.e. connection factory and managed connection instances will log under this category.

Parameters:
strRootLogContext - - the root context from which all log messages generated will be associated. This helps identify log messages according to resource adapter type. Typically, this is related to the adapter/EIS type, etc.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the root log context; the argument cannot be null or "".

getRootLogContext

public java.lang.String getRootLogContext()

Returns:
the root log context for this factory

setAdditionalLogContext

public void setAdditionalLogContext(java.lang.String strAdditionalLogContext)
                             throws javax.resource.ResourceException
Sets additional context information for identifying logging configuration. For example, if this managed connection factory is associated with an order processing application in SAP R/3, the additional log context could be "OrderProcessing" and the root log context could be "SAPR3".

Parameters:
strAdditionalLogContext - - a value that provides additional context information for this instance.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the additional context; the argument cannot be null or "".

getAdditionalLogContext

public java.lang.String getAdditionalLogContext()


setUserName

public void setUserName(java.lang.String strUserName)
                 throws javax.resource.ResourceException
Sets the UserName for connecting to the underlying EIS. As suggested by the J2EE Connector Architecture specification, there are a standard set of connection properties; UserName is a standard property.

Parameters:
strUserName - - a valid UserName for the underlying EIS.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the UserName; the argument cannot be null or empty "".

getUserName

public java.lang.String getUserName()
Retrieves the UserName; a "standard" connection property as suggested by the J2EE Connector Architecture

Returns:
the UserName used to connect to the underlying EIS.

setPassword

public void setPassword(java.lang.String strPassword)
                 throws javax.resource.ResourceException
Sets the Password for connecting to the underlying EIS. As suggested by the J2EE Connector Architecture specification, there are a standard set of connection properties; Password is a standard property.

Parameters:
strPassword - - a valid Password for the underlying EIS.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the Password; the argument cannot be null or empty "".

getPassword

public java.lang.String getPassword()
Retrieves the Password; a "standard" connection property as suggested by the J2EE Connector Architecture

Returns:
the Password used to connect to the underlying EIS.

setServerName

public void setServerName(java.lang.String strServerName)
                   throws javax.resource.ResourceException
Sets the ServerName for connecting to the underlying EIS. As suggested by the J2EE Connector Architecture specification, there are a standard set of connection properties; ServerName is a standard property.

Parameters:
strServerName - - a valid ServerName for the underlying EIS.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the ServerName; the argument cannot be null or empty "".

getServerName

public java.lang.String getServerName()
Retrieves the ServerName; a "standard" connection property as suggested by the J2EE Connector Architecture.

Returns:
the ServerName used to connect to the underlying EIS.

setPortNumber

public void setPortNumber(java.lang.String strPortNumber)
                   throws javax.resource.ResourceException
Sets the PortNumber for connecting to the underlying EIS. As suggested by the J2EE Connector Architecture specification, there are a standard set of connection properties; PortNumber is a standard property.

Parameters:
strPortNumber - - a valid PortNumber for the underlying EIS.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the PortNumber; the argument cannot be null or empty "".

getPortNumber

public java.lang.String getPortNumber()
Retrieves the PortNumber; a "standard" connection property as suggested by the J2EE Connector Architecture

Returns:
the PortNumber used to connect to the underlying EIS.

setConnectionURL

public void setConnectionURL(java.lang.String strConnectionURL)
                      throws javax.resource.ResourceException
Sets the ConnectionURL for connecting to the underlying EIS. As suggested by the J2EE Connector Architecture specification, there are a standard set of connection properties; ConnectionURL is a standard property.

Parameters:
strConnectionURL - - a valid ConnectionURL for the underlying EIS.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the ConnectionURL; the argument cannot be null or empty "".

getConnectionURL

public java.lang.String getConnectionURL()
Retrieves the ConnectionURL; a "standard" connection property as suggested by the J2EE Connector Architecture

Returns:
the ConnectionURL used to connect to the underlying EIS.

setLanguageCode

public void setLanguageCode(java.lang.String strLanguageCode)
                     throws javax.resource.ResourceException
Sets the language code for enabling I18N log and exception messages from instances of this class.

Parameters:
strLanguageCode - - lowercase two-letter ISO-639 code.
Throws:
javax.resource.ResourceException - - if the parameter is null, empty, or is not a valid lowercase two-letter ISO-639 code.

getLanguageCode

public java.lang.String getLanguageCode()


setCountryCode

public void setCountryCode(java.lang.String strCountryCode)
                    throws javax.resource.ResourceException
Sets the country code for enabling I18N log and exception messages from instances of this class.

Parameters:
strCountryCode - - uppercase two-letter ISO-3166 code
Throws:
javax.resource.ResourceException - - if the parameter is null, empty, or is not a valid uppercase two-letter ISO-3166 code.

getCountryCode

public java.lang.String getCountryCode()


setMessageBundleBase

public void setMessageBundleBase(java.lang.String strMessageBundleBase)
                          throws javax.resource.ResourceException
Sets the base name for the message bundle used by this instance.

Parameters:
strMessageBundleBase - - a valid message bundle base name.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the MessageBundleBase; the argument cannot be null or empty "".

getMessageBundleBase

public java.lang.String getMessageBundleBase()


setLogConfigFile

public void setLogConfigFile(java.lang.String strLogConfigFile)
                      throws javax.resource.ResourceException
Sets the name for the log configuration file used by this instance.

Parameters:
strLogConfigFile - - a valid message bundle base name.
Throws:
javax.resource.ResourceException - - an exceptional condition was encountered while attempting to set the LogConfigFile; the argument cannot be null or empty "".

getLogConfigFile

public java.lang.String getLogConfigFile()


logInfo

protected void logInfo()
Writes information about 'this' instance to the underlying logger as a info message.


initAdapterMetaData

protected void initAdapterMetaData(java.util.ResourceBundle resourceBundle)
Retrieves metadata about the resource adapter from a message bundle.

Parameters:
resourceBundle - - provides internationalized and localized versions of adapter metadata.
logger - - an object used to log information about the metadata retrieval process. Currently, if a MissingResourceException is generated, a WARNING is logged.

getUserNameFromRequestInfo

protected java.lang.String getUserNameFromRequestInfo(javax.resource.spi.ConnectionRequestInfo info)
Retrieves the user name from the supplied connection request info object. By default, the connection request info object is assumed to be a java.util.Map with the user name mapped to key "userName". Adapter developers can override this method to process a connection request info object that doesn't meet this criteria.


getPasswordFromRequestInfo

protected java.lang.String getPasswordFromRequestInfo(javax.resource.spi.ConnectionRequestInfo info)
Retrieves the password from the supplied connection request info object. By default, the connection request info object is assumed to be a java.util.Map with the password mapped to key "password". Adapter developers can override this method to process a connection request info object that doesn't meet this criteria.


getPasswordCredential

public javax.resource.spi.security.PasswordCredential getPasswordCredential(javax.security.auth.Subject subject,
                                                                            javax.resource.spi.ConnectionRequestInfo info)
                                                                     throws javax.resource.ResourceException
Returns an object that encapsulates a user name and password, gathered from either the JAAS Subject object or the connection request info object. This method supports the security contract options A and C. Option A is where the resource adapter explicitly checks whether the Subject instance is non-null and carries a PasswordCredential instance using the getPrivateCredentials method. Option C is where the Subject instance is null. In this case, the resource adapter has two options: 1) extract security information from the ConnectionRequestInfo object if it is not null, or 2) if it does not find appropriate security credentials on the ConnectionRequestInfo instance, then the resource adapter uses the default security configuration on the ManagedConnectionFactory instance.


checkLicense

protected ValidationResult checkLicense()
Returns true if the adapter can locate a valid license in the runtime environment. Currently, this method always returns VALID for the license check. Adapter developers should override this method to perform an actual license check.

Returns:
ValidationResult - an object that describes the result of a validation check; a ValidationResult object may or may not have additional information associated with it. The additional information is used to generate a "better" exception on a failed validation attempt.

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.ResourceException
This method is invoked in the non-managed case. The connection factory instance gets initialized with a default connection manager provided by the ADK.
Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory

Returns:
a new instance of a connection factory for the resource adapter.
Throws:
javax.resource.ResourceException - - an exceptional condition occured while attempting to create a connection factory.

createConnectionFactory

public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager connectionManager)
                                         throws javax.resource.ResourceException
Creates an EIS-specific connection factory. The connection factory gets associated with the connection manager passed in. The connection factory created in this method is responsible for generating the application-level connection handle.
Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory

Parameters:
connectionManager - - the connection manager is the link into the management services offered by an application server. This method logs and throws a ResourceException if the ConnectionManager parameter is null.
Returns:
a new instance of a connection factory for the resource adapter.
Throws:
javax.resource.ResourceException - - an exceptional condition occured while attempting to create a connection factory.

createConnectionFactory

protected abstract java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager connectionManager,
                                                            java.lang.String strAdapterName,
                                                            java.lang.String strAdapterDescription,
                                                            java.lang.String strAdapterVersion,
                                                            java.lang.String strAdapterVendorName)
                                                     throws javax.resource.ResourceException
Creates a new instance of a connection factory using the supplied parameters.

Parameters:
connectionManager - - the connection manager for the factory; the factory delegates to this object to link into quality of services provided by the application server.
strAdapterName - - the name of the adapter; In CCI, a connection factory is responsible for supplying metadata about a resource adapter.
strAdapterDescription - - a short description of the adapter's purpose in life.
strAdapterVersion - - the current version of the running adapter.
strVendorName - - the producer of the adapter.
See Also:
ConnectionFactoryImpl, LocalTransaction

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Calculates an integer code for use in lookup from hash tables. Be sure to only include member variables which are directly set from the ra.xml and weblogic-ra.xml deployment descriptors. Don't use any internal state variable that can get initialized after the MCF is added to a hash table.
Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory

Overrides:
hashCode in class java.lang.Object

hasSameBaseProperties

protected boolean hasSameBaseProperties(AbstractManagedConnectionFactory otherMcf)
Compares all the non-connection related properties provided by com.bea.adapter.spi.AbstractManagedConnectionFactory


hasSameConnectionProperties

protected boolean hasSameConnectionProperties(AbstractManagedConnectionFactory otherMcf)
Adapter developers should override this method if they have connection properties other than the standard ones provided by this implementation.


compareCharArrays

protected boolean compareCharArrays(char[] achMyProperty,
                                    char[] achOtherProperty)
Compares two property arrays for equality.


comparePropertyValues

protected boolean comparePropertyValues(java.lang.Object myProperty,
                                        java.lang.Object otherProperty)
Compares two properties for equality.


setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws javax.resource.ResourceException
Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnectionFactory


getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException
Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory


toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

appendField

protected void appendField(java.lang.StringBuffer sb,
                           java.lang.String strPropertyName,
                           java.lang.Object objValue)


getAdapterName

public final java.lang.String getAdapterName()

Returns:
adapter name; the adapter name is initialized with the value for adapter_name in the message bundle for this instance.

setAdapterName

public final void setAdapterName(java.lang.String strAdapterName)
                          throws javax.resource.ResourceException
Sets the adapter name; this overrides the setting provided by the message bundle for this instance if the adapter_name key is mapped to a value in the message bundle.


getAdapterDescription

public final java.lang.String getAdapterDescription()

Returns:
adapter description; the adapter description is initialized with the value for adapter_description in the message bundle for this instance.

setAdapterDescription

public final void setAdapterDescription(java.lang.String strAdapterDescription)
                                 throws javax.resource.ResourceException
Sets the adapter description; this overrides the setting provided by the message bundle for this instance if the adapter_description key is mapped to a value in the message bundle.


getAdapterVersion

public final java.lang.String getAdapterVersion()

Returns:
adapter version; the adapter version is initialized with the value for adapter_version in the message bundle for this instance.

setAdapterVersion

public final void setAdapterVersion(java.lang.String strAdapterVersion)
                             throws javax.resource.ResourceException
Sets the adapter version; this overrides the setting provided by the message bundle for this instance if the adapter_version key is mapped to a value in the message bundle.


getAdapterVendor

public final java.lang.String getAdapterVendor()

Returns:
adapter vendor; the adapter vendor is initialized with the value for adapter_vendor in the message bundle for this instance.

setAdapterVendor

public final void setAdapterVendor(java.lang.String strAdapterVendor)
                            throws javax.resource.ResourceException
Sets the adapter vendor; this overrides the setting provided by the message bundle for this instance if the adapter_vendor key is mapped to a value in the message bundle.


matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo info)
                                                             throws javax.resource.ResourceException
This method gets called by the ConnectionManager to try to find a valid connection in the pool it is managing. If this method returns null, then the ConnectionManager will allocate a new connection to the EIS via a call to createManagedConnection. This class uses the following approach to matching a connection: It iterates over the connectionSet, for each object in the set (until a match is found) it determines if it is an AbstractManagedConnection. If it is, then this is compared to the ManagedConnectionFactory for the AbstractManagedConnection from the set. If the factories are equal, then the compareCredentials method is invoked on the AbstractManagedConnection If this method returns true, then the instance is returned.
Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory


addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
To support JavaBeans constrained properties


removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
To support JavaBeans constrained properties


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
To support JavaBeans constrained properties


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
To support JavaBeans constrained properties


WebLogic Integration

WebLogic Integration (WLI)