-
public interface Connection
A Connection represents an application-level handle that is used by a client to access the underlying physical connection. The actual physical connection associated with a Connection instance is represented by a ManagedConnection instance.A client gets a Connection instance by using the
getConnection
method on aConnectionFactory
instance. A connection can be associated with zero or more Interaction instances.- Version:
- 0.8
- Author:
- Rahul Sharma
- See Also:
ConnectionFactory
,Interaction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
close()
Initiates close of the connection handle at the application level.Interaction
createInteraction()
Creates an Interaction associated with this Connection.LocalTransaction
getLocalTransaction()
Returns an LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection.ConnectionMetaData
getMetaData()
Gets the information on the underlying EIS instance represented through an active connection.ResultSetInfo
getResultSetInfo()
Gets the information on the ResultSet functionality supported by a connected EIS instance.
-
-
-
Method Detail
-
createInteraction
Interaction createInteraction() throws ResourceException
Creates an Interaction associated with this Connection. An Interaction enables an application to execute EIS functions.- Returns:
- Interaction instance
- Throws:
ResourceException
- Failed to create an Interaction
-
getLocalTransaction
LocalTransaction getLocalTransaction() throws ResourceException
Returns an LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection. If a resource adapter does not allow a component to demarcate local transactions on an Connection using LocalTransaction interface, then the method getLocalTransaction should throw a NotSupportedException.- Returns:
- LocalTransaction instance
- Throws:
ResourceException
- Failed to return a LocalTransaction instance because of a resource adapter errorNotSupportedException
- Demarcation of Resource manager local transactions is not supported on this Connection- See Also:
LocalTransaction
-
getMetaData
ConnectionMetaData getMetaData() throws ResourceException
Gets the information on the underlying EIS instance represented through an active connection.- Returns:
- ConnectionMetaData instance representing information about the EIS instance
- Throws:
ResourceException
- Failed to get information about the connected EIS instance. Error can be resource adapter-internal, EIS-specific or communication related.
-
getResultSetInfo
ResultSetInfo getResultSetInfo() throws ResourceException
Gets the information on the ResultSet functionality supported by a connected EIS instance.- Returns:
- ResultSetInfo instance
- Throws:
ResourceException
- Failed to get ResultSet related informationNotSupportedException
- ResultSet functionality is not supported
-
close
void close() throws ResourceException
Initiates close of the connection handle at the application level. A client should not use a closed connection to interact with an EIS.- Throws:
ResourceException
- Exception thrown if close on a connection handle fails.Any invalid connection close invocation--example, calling close on a connection handle that is already closed--should also throw this exception.
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 17:02:45 Cette version de la page est en cache (à la date du 21/08/2025 17:02:45) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 19/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/resource/cci/Connection.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.