Class PermissionDDMCF
java.lang.Object
com.sun.ts.tests.common.connector.whitebox.permissiondd.PermissionDDMCF
- All Implemented Interfaces:
jakarta.resource.Referenceable
,jakarta.resource.spi.ManagedConnectionFactory
,jakarta.resource.spi.ResourceAdapterAssociation
,Serializable
,Referenceable
public class PermissionDDMCF
extends Object
implements jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable
ManagedConnectionFactory implementation for PermissionDDMCF.
This class provides methods to create and manage connections to the underlying EIS.
It also implements ResourceAdapterAssociation and Referenceable interfaces.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new connection factory instance without a connection manager.createConnectionFactory
(jakarta.resource.spi.ConnectionManager cxManager) Creates a new connection factory instance with a connection manager.jakarta.resource.spi.ManagedConnection
createManagedConnection
(Subject subject, jakarta.resource.spi.ConnectionRequestInfo info) Creates a new managed connection to the underlying EIS.void
Logs debug messages.void
dumpConnectionMetaData
(jakarta.resource.spi.ManagedConnection mcon) Dumps the connection metadata.boolean
Compares the given object to the ManagedConnectionFactory instance.int
getCount()
Gets the count.Gets the factory name.Gets the integer property.Gets the log writer.Gets the password.Gives the reference of the class.jakarta.resource.spi.ResourceAdapter
Gets the resource adapter for this ManagedConnectionFactory.Gets the setter method value.Gets the TSR value.getUser()
Gets the user.Gets the user name.int
hashCode()
Gives a hash value to a ManagedConnectionFactory object.void
Looks up the TSR.jakarta.resource.spi.ManagedConnection
matchManagedConnections
(Set connectionSet, Subject subject, jakarta.resource.spi.ConnectionRequestInfo info) Returns the existing connection from the connection pool.void
setCount
(int val) Sets the count.void
setFactoryName
(String name) Sets the factory name.void
setInteger
(Integer val) Sets the integer property.void
setLogWriter
(PrintWriter out) Sets the log writer.void
setPassword
(String val) Sets the password.void
setReference
(Reference ref) Sets the reference of the class.void
setResourceAdapter
(jakarta.resource.spi.ResourceAdapter ra) Sets the resource adapter for this ManagedConnectionFactory.void
setSetterMethodVal
(String val) Sets the setter method value.void
setTsrValue
(String name) Sets the TSR value.void
Sets the user.void
setUserName
(String val) Sets the user name.
-
Constructor Details
-
PermissionDDMCF
public PermissionDDMCF()Default constructor. Initializes the factory name and logs the state.
-
-
Method Details
-
setSetterMethodVal
Sets the setter method value.- Parameters:
val
- the new value to set
-
getSetterMethodVal
Gets the setter method value.- Returns:
- the current setter method value
-
setFactoryName
Sets the factory name.- Parameters:
name
- the new factory name
-
getFactoryName
Gets the factory name.- Returns:
- the current factory name
-
getInteger
Gets the integer property.- Returns:
- the current integer property value
-
setInteger
Sets the integer property.- Parameters:
val
- the new integer property value
-
getUser
Gets the user.- Returns:
- the current user
-
setUser
Sets the user.- Parameters:
val
- the new user
-
getUserName
Gets the user name.- Returns:
- the current user name
-
setUserName
Sets the user name.- Parameters:
val
- the new user name
-
getPassword
Gets the password.- Returns:
- the current password
-
setPassword
Sets the password.- Parameters:
val
- the new password
-
getTsrValue
Gets the TSR value.- Returns:
- the current 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 with a connection manager.- Specified by:
createConnectionFactory
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
cxManager
- the connection manager- Returns:
- the new connection factory instance
- Throws:
jakarta.resource.ResourceException
- if an error occurs
-
createConnectionFactory
Creates a new connection factory instance without a connection manager.- Specified by:
createConnectionFactory
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Returns:
- the new connection factory instance
- Throws:
jakarta.resource.ResourceException
- if an error 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 interfacejakarta.resource.spi.ResourceAdapterAssociation
- Parameters:
ra
- the resource adapter- Throws:
jakarta.resource.ResourceException
- if an error occurs
-
getResourceAdapter
public jakarta.resource.spi.ResourceAdapter getResourceAdapter()Gets the resource adapter for this ManagedConnectionFactory.- Specified by:
getResourceAdapter
in interfacejakarta.resource.spi.ResourceAdapterAssociation
- Returns:
- the current 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 interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
subject
- the subjectinfo
- the connection request info- Returns:
- the new managed connection
- Throws:
jakarta.resource.ResourceException
- if an error 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 interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
connectionSet
- the set of connectionssubject
- the subjectinfo
- the connection request info- Returns:
- the matched managed connection, or null if no match is found
- Throws:
jakarta.resource.ResourceException
- if an error occurs
-
setLogWriter
Sets the log writer.- Specified by:
setLogWriter
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
out
- the print writer- Throws:
jakarta.resource.ResourceException
- if an error occurs
-
getLogWriter
Gets the log writer.- Specified by:
getLogWriter
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Returns:
- the current print writer
- Throws:
jakarta.resource.ResourceException
- if an error 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:
getReference
in interfaceReferenceable
- Returns:
- the current reference
-
setReference
Sets the reference of the class.- Specified by:
setReference
in interfacejakarta.resource.Referenceable
- Parameters:
ref
- the new reference
-
debug
Logs debug messages.- Parameters:
out
- the debug message
-
getCount
public int getCount()Gets the count.- Returns:
- the current count
-
setCount
public void setCount(int val) Sets the count.- Parameters:
val
- the new count
-