|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ManagedConnectionFactory
ManagedConnectionFactory instance is a factory of both ManagedConnection and EIS-specific connection factory instances. This interface supports connection pooling by providing methods for matching and creation of ManagedConnection instance. A ManagedConnectionFactory instance is required to be a JavaBean.
ManagedConnection
Method Summary | |
---|---|
java.lang.Object |
createConnectionFactory()
Creates a Connection Factory instance. |
java.lang.Object |
createConnectionFactory(ConnectionManager cxManager)
Creates a Connection Factory instance. |
ManagedConnection |
createManagedConnection(javax.security.auth.Subject subject,
ConnectionRequestInfo cxRequestInfo)
Creates a new physical connection to the underlying EIS resource manager. |
boolean |
equals(java.lang.Object other)
Check if this ManagedConnectionFactory is equal to another ManagedConnectionFactory. |
java.io.PrintWriter |
getLogWriter()
Get the log writer for this ManagedConnectionFactory instance. |
int |
hashCode()
Returns the hash code for the ManagedConnectionFactory |
ManagedConnection |
matchManagedConnections(java.util.Set connectionSet,
javax.security.auth.Subject subject,
ConnectionRequestInfo cxRequestInfo)
Returns a matched connection from the candidate set of connections. |
void |
setLogWriter(java.io.PrintWriter out)
Set the log writer for this ManagedConnectionFactory instance. |
Method Detail |
---|
java.lang.Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
cxManager
- ConnectionManager to be associated with
created EIS connection factory instance
ResourceException
- Generic exception
ResourceAdapterInternalException
- Resource adapter related error conditionjava.lang.Object createConnectionFactory() throws ResourceException
ResourceException
- Generic exception
ResourceAdapterInternalException
- Resource adapter related error conditionManagedConnection createManagedConnection(javax.security.auth.Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
ManagedConnectionFactory uses the security information (passed as Subject) and additional ConnectionRequestInfo (which is specific to ResourceAdapter and opaque to application server) to create this new connection.
subject
- Caller's security informationcxRequestInfo
- Additional resource adapter specific connection
request information
ResourceException
- generic exception
SecurityException
- security related error
ResourceAllocationException
- failed to allocate system resources for
connection request
ResourceAdapterInternalException
- resource adapter related error condition
EISSystemException
- internal error condition in EIS instanceManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
ManagedConnectionFactory uses the security info (as in Subject) and information provided through ConnectionRequestInfo and additional Resource Adapter specific criteria to do matching. Note that criteria used for matching is specific to a resource adapter and is not prescribed by the Connector specification.
This method returns a ManagedConnection instance that is the best match for handling the connection allocation request.
connectionSet
- candidate connection setsubject
- caller's security informationcxRequestInfo
- additional resource adapter specific
connection request information
ResourceException
- generic exception
SecurityException
- security related error
ResourceAdapterInternalException
- resource adapter related error condition
NotSupportedException
- if operation is not supportedvoid setLogWriter(java.io.PrintWriter out) throws ResourceException
The log writer is a character output stream to which all logging and tracing messages for this ManagedConnectionfactory instance will be printed.
ApplicationServer manages the association of output stream with the ManagedConnectionFactory. When a ManagedConnectionFactory object is created the log writer is initially null, in other words, logging is disabled. Once a log writer is associated with a ManagedConnectionFactory, logging and tracing for ManagedConnectionFactory instance is enabled.
The ManagedConnection instances created by ManagedConnectionFactory "inherits" the log writer, which can be overridden by ApplicationServer using ManagedConnection.setLogWriter to set ManagedConnection specific logging and tracing.
out
- PrintWriter - an out stream for
error logging and tracing
ResourceException
- generic exception
ResourceAdapterInternalException
- resource adapter related error conditionjava.io.PrintWriter getLogWriter() throws ResourceException
The log writer is a character output stream to which all logging and tracing messages for this ManagedConnectionFactory instance will be printed
ApplicationServer manages the association of output stream with the ManagedConnectionFactory. When a ManagedConnectionFactory object is created the log writer is initially null, in other words, logging is disabled.
ResourceException
- generic exceptionint hashCode()
hashCode
in class java.lang.Object
boolean equals(java.lang.Object other)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41