public class ManagedConnectionFactoryImpl
extends java.lang.Object
implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation, javax.resource.spi.ValidatingManagedConnectionFactory, java.io.Serializable
createConnectionFactory
public Object createConnectionFactory()
throws ResourceException
Method called in the non managed case for creating an
OutboundConnectionFactory
instance.
createConnectionFactory
public Object createConnectionFactory(ConnectionManager cxManager)
throws ResourceException
Method called by an application server (managed case) for creating an
OutboundConnectionFactory
instance.
cxManager
- Application server's connections pooling manager.
createManagedConnection
public ManagedConnection createManagedConnection(Subject subject,
ConnectionRequestInfo cxRequest)
throws ResourceException
Creates a new physical connection to the underlying JORAM server,
and returns a ManagedConnectionImpl
instance for a
managed environment.
subject
- Security data, not taken into account.cxRequest
- User identification data, may be null
.
equals
public boolean equals(Object o)
Compares managed factories according to their configuration.
getCnxPendingTimer
public int getCnxPendingTimer()
getCollocated
public java.lang.Boolean getCollocated()
getConnectingTimer
public int getConnectingTimer()
getHostName
public java.lang.String getHostName()
getInvalidConnections
public Set getInvalidConnections(Set connectionSet)
throws ResourceException
From a set of managed connections, returns the set of invalid ones.
getLogWriter
public PrintWriter getLogWriter()
throws ResourceException
Gets the log writer of this ManagedConnectionFactoryImpl
instance.
getPassword
public java.lang.String getPassword()
getResourceAdapter
public ResourceAdapter getResourceAdapter()
Returns the resource adapter central authority instance.
getServerPort
public java.lang.Integer getServerPort()
getTxPendingTimer
public int getTxPendingTimer()
getUserName
public java.lang.String getUserName()
hashCode
public int hashCode()
Returns a code depending on the managed factory configuration.
matchManagedConnections
public ManagedConnection matchManagedConnections(Set connectionSet,
Subject subject,
ConnectionRequestInfo cxRequest)
throws ResourceException
Finds a matching connection from the candidate set of connections and
returns a ManagedConnectionImpl
instance.
connectionSet
- Set of connections to test.subject
- Security data, not taken into account.cxRequest
- User identification data, may be null
.
setCollocated
public void setCollocated(java.lang.Boolean collocated)
setHostName
public void setHostName(java.lang.String hostName)
setLogWriter
public void setLogWriter(PrintWriter out)
throws ResourceException
Sets the log writer for this ManagedConnectionFactoryImpl
instance.
setParameters
protected void setParameters(Object factory)
setPassword
public void setPassword(java.lang.String password)
setResourceAdapter
public void setResourceAdapter(ResourceAdapter ra)
throws ResourceException
Sets the resource adapter central authority.
setServerPort
public void setServerPort(java.lang.Integer serverPort)
setUserName
public void setUserName(java.lang.String userName)