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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new connection factory instance.createConnectionFactory(jakarta.resource.spi.ConnectionManager cxManager) Creates a new connection factory instance.jakarta.resource.spi.ManagedConnectioncreateManagedConnection(Subject subject, jakarta.resource.spi.ConnectionRequestInfo info) Creates a new managed connection to the underlying EIS.voidDebugging method.voiddumpConnectionMetaData(jakarta.resource.spi.ManagedConnection mcon) Dumps the connection metadata.booleanCompares the given object to the ManagedConnectionFactory instance.intgetCount()Gets the count.Gets the factory name.Gets the integer value.Gets the log writer.Gets the password.Gives the reference of the class.jakarta.resource.spi.ResourceAdapterGets the resource adapter for this ManagedConnectionFactory.Gets the setter method value.Gets the TSR value.getUser()Gets the user.Gets the user name.inthashCode()Gives a hash value to a ManagedConnectionFactory object.voidLooks up the TSR.jakarta.resource.spi.ManagedConnectionmatchManagedConnections(Set connectionSet, Subject subject, jakarta.resource.spi.ConnectionRequestInfo info) Returns the existing connection from the connection pool.voidsetCount(int val) Sets the count.voidsetFactoryName(String name) Sets the factory name.voidsetInteger(Integer val) Sets the integer value.voidsetLogWriter(PrintWriter out) Sets the log writer.voidsetPassword(String val) Sets the password.voidsetReference(Reference ref) Sets the reference of the class.voidsetResourceAdapter(jakarta.resource.spi.ResourceAdapter ra) Sets the resource adapter for this ManagedConnectionFactory.voidsetSetterMethodVal(String val) Sets the setter method value.voidsetTsrValue(String name) Sets the TSR value.voidSets the user.voidsetUserName(String val) Sets the user name.
-
Constructor Details
-
AnnoManagedConnectionFactory
public AnnoManagedConnectionFactory()Default constructor.
-
-
Method Details
-
setSetterMethodVal
Sets the setter method value.- Parameters:
val- the new value
-
getSetterMethodVal
Gets the setter method value.- Returns:
- the setter method value
-
setFactoryName
Sets the factory name.- Parameters:
name- the new factory name
-
getFactoryName
Gets the factory name.- Returns:
- the factory name
-
getInteger
Gets the integer value.- Returns:
- the integer value
-
setInteger
Sets the integer value.- Parameters:
val- the new integer value
-
getUser
Gets the user.- Returns:
- the user
-
setUser
Sets the user.- Parameters:
val- the new user
-
getUserName
Gets the user name.- Returns:
- the user name
-
setUserName
Sets the user name.- Parameters:
val- the new user name
-
getPassword
Gets the password.- Returns:
- the password
-
setPassword
Sets the password.- Parameters:
val- the new password
-
getTsrValue
Gets the TSR value.- Returns:
- the TSR value
-
setTsrValue
Sets the TSR value.- Parameters:
name- the new TSR value
-
lookupTSR
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:
createConnectionFactoryin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
cxManager- the connection manager- Returns:
- the connection factory instance
- Throws:
jakarta.resource.ResourceException- if a resource exception occurs
-
createConnectionFactory
Creates a new connection factory instance.- Specified by:
createConnectionFactoryin interfacejakarta.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:
setResourceAdapterin interfacejakarta.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:
getResourceAdapterin interfacejakarta.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:
createManagedConnectionin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
subject- the subjectinfo- 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:
matchManagedConnectionsin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
connectionSet- the connection setsubject- the subjectinfo- the connection request info- Returns:
- the managed connection
- Throws:
jakarta.resource.ResourceException- if a resource exception occurs
-
setLogWriter
Sets the log writer.- Specified by:
setLogWriterin interfacejakarta.resource.spi.ManagedConnectionFactory- Parameters:
out- the print writer- Throws:
jakarta.resource.ResourceException- if a resource exception occurs
-
getLogWriter
Gets the log writer.- Specified by:
getLogWriterin interfacejakarta.resource.spi.ManagedConnectionFactory- Returns:
- the print writer
- Throws:
jakarta.resource.ResourceException- if a resource exception occurs
-
equals
Compares the given object to the ManagedConnectionFactory instance. -
hashCode
public int hashCode()Gives a hash value to a ManagedConnectionFactory object. -
getReference
Gives the reference of the class.- Specified by:
getReferencein interfaceReferenceable- Returns:
- the reference
-
setReference
Sets the reference of the class.- Specified by:
setReferencein interfacejakarta.resource.Referenceable- Parameters:
ref- the new reference
-
debug
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
-