public class SampleManagedConnectionFactory
extends java.lang.Object
implements javax.resource.spi.ManagedConnectionFactory, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright statement.
|
Constructor and Description |
---|
SampleManagedConnectionFactory()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
createConnectionFactory()
This method creates a SampleConnectionFactory.
|
java.lang.Object |
createConnectionFactory(javax.resource.spi.ConnectionManager cm)
This method creates a SampleConnectionFactory using ConnectionManager.
|
javax.resource.spi.ManagedConnection |
createManagedConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
This method creates a SampleManagedConnection.
|
javax.resource.spi.ConnectionManager |
getConnectionManager()
This method gets a connection manager.
|
java.lang.String |
getInput()
This method gets the input.
|
java.io.PrintWriter |
getLogWriter()
This method gets the log writer.
|
java.lang.String |
getPassword()
This method gets the password.
|
int |
getTraceLevel()
This method gets the trace Level.
|
java.lang.String |
getUserName()
This method gets the user name.
|
javax.resource.spi.ManagedConnection |
matchManagedConnections(java.util.Set connectionSet,
javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
This method matches the managed connections.
|
void |
setInput(java.lang.String theInput)
This method sets the input.
|
void |
setLogWriter(java.io.PrintWriter pw)
This method sets the log writer.
|
void |
setPassword(java.lang.String password)
This method sets the password.
|
void |
setUserName(java.lang.String userName)
This method sets the user name.
|
public static final java.lang.String COPYRIGHT
public SampleManagedConnectionFactory()
public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cm) throws javax.resource.ResourceException
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
cm
- ConnectionManagerjavax.resource.ResourceException
- Raised when failed to create an instance of SampleConnectionFactory.public java.lang.Object createConnectionFactory() throws javax.resource.ResourceException
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
- Raised when failed to create a SampleConnectionFactory.public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info) throws javax.resource.ResourceException
createManagedConnection
in interface javax.resource.spi.ManagedConnectionFactory
subject
- The Subject object.info
- The ConnectionRequestInfo object.javax.resource.ResourceException
- Raised when failed to create SampleManagedConnection.public javax.resource.spi.ConnectionManager getConnectionManager()
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
public void setLogWriter(java.io.PrintWriter pw) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
PrintWriter
- javax.resource.ResourceException
public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info) throws javax.resource.ResourceException
matchManagedConnections
in interface javax.resource.spi.ManagedConnectionFactory
connectionSet
- The connectionSetsubject
- The connection subjectinfo
- ConnectionRequestInfojavax.resource.ResourceException
public void setUserName(java.lang.String userName) throws javax.resource.ResourceException
userName
- The user namejavax.resource.ResourceException
- Raised when any error occured.public java.lang.String getUserName() throws javax.resource.ResourceException
javax.resource.ResourceException
- Raised when any error occured.public void setPassword(java.lang.String password) throws javax.resource.ResourceException
password
- The password.javax.resource.ResourceException
- Raised when any error occured.public java.lang.String getPassword() throws javax.resource.ResourceException
javax.resource.ResourceException
- Raised when any error occured.public int getTraceLevel()
public java.lang.String getInput()
public void setInput(java.lang.String theInput)
input
- The input.