Class AnnoManagedConnectionFactory

java.lang.Object
com.sun.ts.tests.common.connector.whitebox.annotated.AnnoManagedConnectionFactory
All Implemented Interfaces:
jakarta.resource.Referenceable, jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ResourceAdapterAssociation, Serializable, Referenceable

@ConnectionDefinitions(@ConnectionDefinition(connectionFactory=TSConnectionFactory.class,connectionFactoryImpl=TSEISDataSource.class,connection=TSConnection.class,connectionImpl=TSEISConnection.class)) public class AnnoManagedConnectionFactory extends Object implements jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable
AnnoManagedConnectionFactory is a managed connection factory that provides connection management for the underlying EIS (Enterprise Information System). It implements the ManagedConnectionFactory, ResourceAdapterAssociation, and Referenceable interfaces, and is Serializable.
See Also:
  • Constructor Details

    • AnnoManagedConnectionFactory

      public AnnoManagedConnectionFactory()
      Default constructor.
  • Method Details

    • setSetterMethodVal

      @ConfigProperty public void setSetterMethodVal(String val)
      Sets the setter method value.
      Parameters:
      val - the new value
    • getSetterMethodVal

      public String getSetterMethodVal()
      Gets the setter method value.
      Returns:
      the setter method value
    • setFactoryName

      public void setFactoryName(String name)
      Sets the factory name.
      Parameters:
      name - the new factory name
    • getFactoryName

      public String getFactoryName()
      Gets the factory name.
      Returns:
      the factory name
    • getInteger

      public Integer getInteger()
      Gets the integer value.
      Returns:
      the integer value
    • setInteger

      public void setInteger(Integer val)
      Sets the integer value.
      Parameters:
      val - the new integer value
    • getUser

      public String getUser()
      Gets the user.
      Returns:
      the user
    • setUser

      public void setUser(String val)
      Sets the user.
      Parameters:
      val - the new user
    • getUserName

      public String getUserName()
      Gets the user name.
      Returns:
      the user name
    • setUserName

      public void setUserName(String val)
      Sets the user name.
      Parameters:
      val - the new user name
    • getPassword

      public String getPassword()
      Gets the password.
      Returns:
      the password
    • setPassword

      public void setPassword(String val)
      Sets the password.
      Parameters:
      val - the new password
    • getTsrValue

      public String getTsrValue()
      Gets the TSR value.
      Returns:
      the TSR value
    • setTsrValue

      public void setTsrValue(String name)
      Sets the TSR value.
      Parameters:
      name - the new TSR value
    • lookupTSR

      public void lookupTSR(String lookup)
      Looks up the TSR.
      Parameters:
      lookup - the lookup string
    • createConnectionFactory

      public Object createConnectionFactory(jakarta.resource.spi.ConnectionManager cxManager) throws jakarta.resource.ResourceException
      Creates a new connection factory instance.
      Specified by:
      createConnectionFactory in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      cxManager - the connection manager
      Returns:
      the connection factory instance
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • createConnectionFactory

      public Object createConnectionFactory() throws jakarta.resource.ResourceException
      Creates a new connection factory instance.
      Specified by:
      createConnectionFactory in interface jakarta.resource.spi.ManagedConnectionFactory
      Returns:
      the connection factory instance
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • setResourceAdapter

      public void setResourceAdapter(jakarta.resource.spi.ResourceAdapter ra) throws jakarta.resource.ResourceException
      Sets the resource adapter for this ManagedConnectionFactory.
      Specified by:
      setResourceAdapter in interface jakarta.resource.spi.ResourceAdapterAssociation
      Parameters:
      ra - the resource adapter
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • getResourceAdapter

      public jakarta.resource.spi.ResourceAdapter getResourceAdapter()
      Gets the resource adapter for this ManagedConnectionFactory.
      Specified by:
      getResourceAdapter in interface jakarta.resource.spi.ResourceAdapterAssociation
      Returns:
      the resource adapter
    • createManagedConnection

      public jakarta.resource.spi.ManagedConnection createManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo info) throws jakarta.resource.ResourceException
      Creates a new managed connection to the underlying EIS.
      Specified by:
      createManagedConnection in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      subject - the subject
      info - the connection request info
      Returns:
      the managed connection
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • dumpConnectionMetaData

      public void dumpConnectionMetaData(jakarta.resource.spi.ManagedConnection mcon)
      Dumps the connection metadata.
      Parameters:
      mcon - the managed connection
    • matchManagedConnections

      public jakarta.resource.spi.ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, jakarta.resource.spi.ConnectionRequestInfo info) throws jakarta.resource.ResourceException
      Returns the existing connection from the connection pool.
      Specified by:
      matchManagedConnections in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      connectionSet - the connection set
      subject - the subject
      info - the connection request info
      Returns:
      the managed connection
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • setLogWriter

      public void setLogWriter(PrintWriter out) throws jakarta.resource.ResourceException
      Sets the log writer.
      Specified by:
      setLogWriter in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      out - the print writer
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • getLogWriter

      public PrintWriter getLogWriter() throws jakarta.resource.ResourceException
      Gets the log writer.
      Specified by:
      getLogWriter in interface jakarta.resource.spi.ManagedConnectionFactory
      Returns:
      the print writer
      Throws:
      jakarta.resource.ResourceException - if a resource exception occurs
    • equals

      public boolean equals(Object obj)
      Compares the given object to the ManagedConnectionFactory instance.
      Specified by:
      equals in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Gives a hash value to a ManagedConnectionFactory object.
      Specified by:
      hashCode in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      hashCode in class Object
      Returns:
      the hash value
    • getReference

      public Reference getReference()
      Gives the reference of the class.
      Specified by:
      getReference in interface Referenceable
      Returns:
      the reference
    • setReference

      public void setReference(Reference ref)
      Sets the reference of the class.
      Specified by:
      setReference in interface jakarta.resource.Referenceable
      Parameters:
      ref - the new reference
    • debug

      public void debug(String out)
      Debugging method.
      Parameters:
      out - the debug message
    • getCount

      public int getCount()
      Gets the count.
      Returns:
      the count
    • setCount

      public void setCount(int val)
      Sets the count.
      Parameters:
      val - the new count