javax.resource.cci

Interface ConnectionFactory

  • All Superinterfaces:
    Referenceable, Serializable

    public interface ConnectionFactory
    extends Serializable, Referenceable
    ConnectionFactory provides an interface for getting connection to an EIS instance. An implementation of ConnectionFactory interface is provided by a resource adapter.

    Application code looks up a ConnectionFactory instance from JNDI namespace and uses it to get EIS connections.

    An implementation class for ConnectionFactory is required to implement java.io.Serializable and javax.resource.Referenceableinterfaces to support JNDI registration.

    Version:
    0.8
    Author:
    Rahul Sharma
    See Also:
    Connection, Referenceable
    • Method Detail

      • getConnection

        Connection getConnection()
                          throws ResourceException
        Gets a connection to an EIS instance. This getConnection variant should be used when a component wants the container to manage EIS sign-on. This case is termed container-managed sign-on. The component does not pass any security information.
        Returns:
        Connection instance
        Throws:
        ResourceException - Failed to get a connection to the EIS instance. Examples of error cases are:
        • Invalid configuration of ManagedConnectionFactory-- example: invalid server name
        • Application server-internal error--example: connection pool related error
        • Communication error
        • EIS-specific error--example: EIS not active
        • Resource adapter-internal error
        • Security related error; example: invalid user
        • Failure to allocate system resources
      • getConnection

        Connection getConnection(ConnectionSpec properties)
                          throws ResourceException
        Gets a connection to an EIS instance. A component should use the getConnection variant with javax.resource.cci.ConnectionSpec parameter, if it needs to pass any resource adapter specific security information and connection parameters. In the component- managed sign-on case, an application component passes security information (example: username, password) through the ConnectionSpec instance.

        It is important to note that the properties passed through the getConnection method should be client-specific (example: username, password, language) and not related to the configuration of a target EIS instance (example: port number, server name). The ManagedConnectionFactory instance is configured with complete set of properties required for the creation of a connection to an EIS instance.

        Parameters:
        properties - Connection parameters and security information specified as ConnectionSpec instance
        Returns:
        Connection instance
        Throws:
        ResourceException - Failed to get a connection to the EIS instance. Examples of error cases are:
        • Invalid specification of input parameters
        • Invalid configuration of ManagedConnectionFactory-- example: invalid server name
        • Application server-internal error--example: connection pool related error
        • Communication error
        • EIS-specific error--example: EIS not active
        • Resource adapter-internal error
        • Security related error; example: invalid user
        • Failure to allocate system resources
        See Also:
        ConnectionSpec
      • getMetaData

        ResourceAdapterMetaData getMetaData()
                                     throws ResourceException
        Gets metadata for the Resource Adapter. Note that the metadata information is about the ResourceAdapter and not the EIS instance. An invocation of this method does not require that an active connection to an EIS instance should have been established.
        Returns:
        ResourceAdapterMetaData instance
        Throws:
        ResourceException - Failed to get metadata information about the resource adapter

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 20:17:57 Cette version de la page est en cache (à la date du 21/08/2025 20:17:57) 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/ConnectionFactory.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

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, ConnectionFactory

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.