-
- All Superinterfaces:
- Serializable
public interface ManagedConnectionFactory extends Serializable
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.- Version:
- 0.6
- Author:
- Rahul Sharma
- See Also:
ManagedConnection
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Object
createConnectionFactory()
Creates a Connection Factory instance.Object
createConnectionFactory(ConnectionManager cxManager)
Creates a Connection Factory instance.ManagedConnection
createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo)
Creates a new physical connection to the underlying EIS resource manager.boolean
equals(Object other)
Check if this ManagedConnectionFactory is equal to another ManagedConnectionFactory.PrintWriter
getLogWriter()
Get the log writer for this ManagedConnectionFactory instance.int
hashCode()
Returns the hash code for the ManagedConnectionFactoryManagedConnection
matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo cxRequestInfo)
Returns a matched connection from the candidate set of connections.void
setLogWriter(PrintWriter out)
Set the log writer for this ManagedConnectionFactory instance.
-
-
-
Method Detail
-
createConnectionFactory
Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
Creates a Connection Factory instance. The Connection Factory instance gets initialized with the passed ConnectionManager. In the managed scenario, ConnectionManager is provided by the application server.- Parameters:
cxManager
- ConnectionManager to be associated with created EIS connection factory instance- Returns:
- EIS-specific Connection Factory instance or javax.resource.cci.ConnectionFactory instance
- Throws:
ResourceException
- Generic exceptionResourceAdapterInternalException
- Resource adapter related error condition
-
createConnectionFactory
Object createConnectionFactory() throws ResourceException
Creates a Connection Factory instance. The Connection Factory instance gets initialized with a default ConnectionManager provided by the resource adapter.- Returns:
- EIS-specific Connection Factory instance or javax.resource.cci.ConnectionFactory instance
- Throws:
ResourceException
- Generic exceptionResourceAdapterInternalException
- Resource adapter related error condition
-
createManagedConnection
ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
Creates a new physical connection to the underlying EIS resource manager.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.
- Parameters:
subject
- Caller's security informationcxRequestInfo
- Additional resource adapter specific connection request information- Returns:
- ManagedConnection instance
- Throws:
ResourceException
- generic exceptionSecurityException
- security related errorResourceAllocationException
- failed to allocate system resources for connection requestResourceAdapterInternalException
- resource adapter related error conditionEISSystemException
- internal error condition in EIS instance
-
matchManagedConnections
ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
Returns a matched connection from the candidate set of connections.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.
- Parameters:
connectionSet
- candidate connection setsubject
- caller's security informationcxRequestInfo
- additional resource adapter specific connection request information- Returns:
- ManagedConnection if resource adapter finds an acceptable match otherwise null
- Throws:
ResourceException
- generic exceptionSecurityException
- security related errorResourceAdapterInternalException
- resource adapter related error conditionNotSupportedException
- if operation is not supported
-
setLogWriter
void setLogWriter(PrintWriter out) throws ResourceException
Set the log writer for this ManagedConnectionFactory instance.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.
- Parameters:
out
- PrintWriter - an out stream for error logging and tracing- Throws:
ResourceException
- generic exceptionResourceAdapterInternalException
- resource adapter related error condition
-
getLogWriter
PrintWriter getLogWriter() throws ResourceException
Get the log writer for this ManagedConnectionFactory instance.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.
- Returns:
- PrintWriter
- Throws:
ResourceException
- generic exception
-
hashCode
int hashCode()
Returns the hash code for the ManagedConnectionFactory
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/resource/spi/ManagedConnectionFactory.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.