Class SampleConnectionManager

  • java.lang.Object
  • All Implemented Interfaces:, javax.resource.spi.ConnectionManager

    public class SampleConnectionManager
    extends java.lang.Object
    implements javax.resource.spi.ConnectionManager,

    This class provides a connection manager used in non-managed environment.

    See Also:
    SampleConnectionFactory, SampleConnection, Serialized Form
    • Field Summary

      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      Copyright statement.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo info)
      Allocate connection using provided information.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail


        public static final java.lang.String COPYRIGHT
        Copyright statement.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SampleConnectionManager

        public SampleConnectionManager()
        Default Constructor
    • Method Detail

      • allocateConnection

        public java.lang.Object allocateConnection(javax.resource.spi.ManagedConnectionFactory mcf,
                                                   javax.resource.spi.ConnectionRequestInfo info)
                                            throws javax.resource.ResourceException
        Allocate connection using provided information.
        Specified by:
        allocateConnection in interface javax.resource.spi.ConnectionManager
        mcf - The javax.resource.spi.ManagedConnectionFactory,
        info - The javax.resource.spi.ConnectionRequestInfo
        The connection object
        javax.resource.ResourceException - Raised when failed to allocate a connection.