com.sas.net.jca
Class ManagedConnectionFactoryImpl

com.sas.net.jca.ManagedConnectionFactoryImpl

public class ManagedConnectionFactoryImpl

This class supports connection pooling by defining methods for matching and creating connections.


Constructor Summary
ManagedConnectionFactoryImpl()
          This constructor can be used in both non-managed and managed environments.
ManagedConnectionFactoryImpl(WorkspaceFactory workspaceFactory)
          This constructor is used only in non-managed environments.
 
Method Summary
 java.lang.Object createConnectionFactory()
          Get a connection factory for connections created by this object.
 java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager connectionManager)
          Get a connection factory for connections created by this object.
 javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
          Create a managed connection.
 boolean equals(java.lang.Object object)
          Returns true if the given object is equal to this object.
 java.lang.Integer getDebugLevel()
           
 java.lang.String getEncryptionAlgorithms()
           
 java.lang.String getEncryptionContent()
           
 java.lang.String getEncryptionPolicy()
           
 java.io.PrintWriter getLogWriter()
          Get the character output stream for the log.
 java.lang.String getPassword()
           
 java.lang.Integer getPortNumber()
           
 java.lang.String getRepositoryBaseDN()
           
 java.lang.String getRepositoryInitialContextFactory()
           
 java.lang.String getRepositoryLogicalName()
           
 java.lang.String getRepositoryProviderURL()
           
 java.lang.String getRepositorySecurityCredentials()
           
 java.lang.String getRepositorySecurityPrincipal()
           
 java.lang.String getServerName()
           
 java.lang.Boolean getUserAuthorizationRequired()
           
 java.lang.String getUserName()
           
 int hashCode()
          Get a hash code for this object.
 javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set set, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
          Match a request for a connection to an existing connection in the pool.
 void setDebugLevel(java.lang.Integer debugLevel)
           
 void setEncryptionAlgorithms(java.lang.String encryptionAlgorithms)
           
 void setEncryptionContent(java.lang.String encryptionContent)
           
 void setEncryptionPolicy(java.lang.String encryptionPolicy)
           
 void setLogWriter(java.io.PrintWriter logWriter)
          Set the character output stream for the log.
 void setPassword(java.lang.String Password)
           
 void setPortNumber(java.lang.Integer PortNumber)
           
 void setRepositoryBaseDN(java.lang.String repositoryBaseDN)
           
 void setRepositoryInitialContextFactory(java.lang.String repositoryInitialContextFactory)
           
 void setRepositoryLogicalName(java.lang.String repositoryLogicalName)
           
 void setRepositoryProviderURL(java.lang.String repositoryProviderURL)
           
 void setRepositorySecurityCredentials(java.lang.String repositorySecurityCredentials)
           
 void setRepositorySecurityPrincipal(java.lang.String repositorySecurityPrincipal)
           
 void setServerName(java.lang.String ServerName)
           
 void setUserAuthorizationRequired(java.lang.Boolean userAuthorizationRequired)
           
 void setUserName(java.lang.String UserName)
           
 

Constructor Detail

ManagedConnectionFactoryImpl

public ManagedConnectionFactoryImpl()
This constructor can be used in both non-managed and managed environments. In a non-managed environment (i.e. outside a J2EE server), the caller should use the accessor methods to configure this object after constructing it.

ManagedConnectionFactoryImpl

public ManagedConnectionFactoryImpl(WorkspaceFactory workspaceFactory)
This constructor is used only in non-managed environments. Functionality for creating connections is delegated to the workspace factory. No further configuration of this object is necessary.
Parameters:
workspaceFactory - factory to delegate to.
Method Detail

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.ResourceException
Get a connection factory for connections created by this object. Connection pooling will be handled by the default connection manager.
Returns:
a connection factory
Throws:
javax.resource.ResourceException - if there is an error creating a connection factory.

createConnectionFactory

public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager connectionManager)
                                         throws javax.resource.ResourceException
Get a connection factory for connections created by this object. Connection pooling will be handled by the given connection manager. This method is typically called only in a managed environment.
Parameters:
connectionManager - the connection manager to use for pooling.
Returns:
a connection factory
Throws:
javax.resource.ResourceException - if there is an error creating a connection factory.

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
                                                             throws javax.resource.ResourceException
Create a managed connection. This method is typically only called by a connection factory.

equals

public boolean equals(java.lang.Object object)
Returns true if the given object is equal to this object.

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException
Get the character output stream for the log.
Returns:
the character output stream for the log.
Throws:
javax.resource.ResourceException - this exception must be declared to implement the contract, but it is never thrown in this implementation.

hashCode

public int hashCode()
Get a hash code for this object.
Returns:
a hash code for this object.

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set set,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
                                                             throws javax.resource.ResourceException
Match a request for a connection to an existing connection in the pool. This method is typically only called in a managed environment.

setLogWriter

public void setLogWriter(java.io.PrintWriter logWriter)
                  throws javax.resource.ResourceException
Set the character output stream for the log.
Parameters:
logWriter - the character output stream for the log.
Throws:
javax.resource.ResourceException - this exception must be declared to implement the contract, but it is never thrown in this implementation.

setServerName

public void setServerName(java.lang.String ServerName)

getServerName

public java.lang.String getServerName()

setPortNumber

public void setPortNumber(java.lang.Integer PortNumber)

getPortNumber

public java.lang.Integer getPortNumber()

setUserName

public void setUserName(java.lang.String UserName)

getUserName

public java.lang.String getUserName()

setPassword

public void setPassword(java.lang.String Password)

getPassword

public java.lang.String getPassword()

setEncryptionPolicy

public void setEncryptionPolicy(java.lang.String encryptionPolicy)

getEncryptionPolicy

public java.lang.String getEncryptionPolicy()

setEncryptionAlgorithms

public void setEncryptionAlgorithms(java.lang.String encryptionAlgorithms)

getEncryptionAlgorithms

public java.lang.String getEncryptionAlgorithms()

setEncryptionContent

public void setEncryptionContent(java.lang.String encryptionContent)

getEncryptionContent

public java.lang.String getEncryptionContent()

setDebugLevel

public void setDebugLevel(java.lang.Integer debugLevel)

getDebugLevel

public java.lang.Integer getDebugLevel()

setRepositoryLogicalName

public void setRepositoryLogicalName(java.lang.String repositoryLogicalName)

getRepositoryLogicalName

public java.lang.String getRepositoryLogicalName()

setRepositoryInitialContextFactory

public void setRepositoryInitialContextFactory(java.lang.String repositoryInitialContextFactory)

getRepositoryInitialContextFactory

public java.lang.String getRepositoryInitialContextFactory()

setRepositoryProviderURL

public void setRepositoryProviderURL(java.lang.String repositoryProviderURL)

getRepositoryProviderURL

public java.lang.String getRepositoryProviderURL()

setRepositoryBaseDN

public void setRepositoryBaseDN(java.lang.String repositoryBaseDN)

getRepositoryBaseDN

public java.lang.String getRepositoryBaseDN()

setRepositorySecurityPrincipal

public void setRepositorySecurityPrincipal(java.lang.String repositorySecurityPrincipal)

getRepositorySecurityPrincipal

public java.lang.String getRepositorySecurityPrincipal()

setRepositorySecurityCredentials

public void setRepositorySecurityCredentials(java.lang.String repositorySecurityCredentials)

getRepositorySecurityCredentials

public java.lang.String getRepositorySecurityCredentials()

setUserAuthorizationRequired

public void setUserAuthorizationRequired(java.lang.Boolean userAuthorizationRequired)

getUserAuthorizationRequired

public java.lang.Boolean getUserAuthorizationRequired()