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

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/resource/cci/connectionfactory.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com/en/java/, Interface ConnectionFactory

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.