javax.resource.cci

Interface Connection


  • 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 a ConnectionFactory instance. A connection can be associated with zero or more Interaction instances.

    Version:
    0.8
    Author:
    Rahul Sharma
    See Also:
    ConnectionFactory, Interaction
    • 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 error
        NotSupportedException - 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.
      • 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.

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/resource/cci/connection.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.