com.ibm.commerce.messaging.adapters.jcasample
Class SampleManagedConnectionFactory

java.lang.Object
  |
  +--com.ibm.commerce.messaging.adapters.jcasample.SampleManagedConnectionFactory
All Implemented Interfaces:
java.io.Serializable

public class SampleManagedConnectionFactory
extends java.lang.Object
implements java.io.Serializable

This is the factory class used by WAS to create physical connection for SampleConnector. It implements the connection management interface (the server part) of the application server contract.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright statement.
 
Constructor Summary
SampleManagedConnectionFactory()
          Default constructor
 
Method Summary
 java.lang.Object createConnectionFactory()
          Creates a SampleConnectionFactory.
 java.lang.Object createConnectionFactory(ConnectionManager cm)
          Creates a SampleconnectionFactory using ConnectionManager.
 ManagedConnection createManagedConnection(javax.security.auth.Subject subject, ConnectionRequestInfo info)
          Creates a SampleManagedConnection.
 ConnectionManager getConnectionManager()
          Gets a connection manager
 java.lang.String getInput()
          Gets input
 java.io.PrintWriter getLogWriter()
          Gets the log writer
 java.lang.String getPassword()
          Gets password
 int getTraceLevel()
          Gets traceLevel
 java.lang.String getUserName()
          Gets userName
 ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, ConnectionRequestInfo info)
          Matches the managed connections
 void setInput(java.lang.String theInput)
          Sets input
 void setLogWriter(java.io.PrintWriter pw)
          Sets the log writer
 void setPassword(java.lang.String password)
          Sets password
 void setUserName(java.lang.String userName)
          Sets user name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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

SampleManagedConnectionFactory

public SampleManagedConnectionFactory()
Default constructor
Method Detail

createConnectionFactory

public java.lang.Object createConnectionFactory(ConnectionManager cm)
                                         throws ResourceException
Creates a SampleconnectionFactory using ConnectionManager.
Parameters:
cm - ConnectionManager
Returns:
The SampleConnectionFactory.
Throws:
javax.resource.ResourceException - Raised when failed to create a instace of SampleConnectionFactory.
ResourceException

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws ResourceException
Creates a SampleConnectionFactory.
Returns:
The SampleConnectionFactory.
Throws:
javax.resource.ResourceException - Raised when failed to create a SampleConnectionFactory.
ResourceException

createManagedConnection

public ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                 ConnectionRequestInfo info)
                                          throws ResourceException
Creates a SampleManagedConnection. Subject and ConnectionRequestInfo are not used to create SampleManagedConnection in current implementation.
Parameters:
subject - The Subject object.
info - The ConnectionRequestInfo object.
Returns:
ManagedConnection The SampleManagedConnection.
Throws:
javax.resource.ResourceException - Raised when failed to create SampleManagedConnection.
ResourceException

getConnectionManager

public ConnectionManager getConnectionManager()
Gets a connection manager
Returns:
The ConnectionManager.

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws ResourceException
Gets the log writer
Returns:
PrintWriter
Throws:
javax.resource.ResourceException
ResourceException

setLogWriter

public void setLogWriter(java.io.PrintWriter pw)
                  throws ResourceException
Sets the log writer
Throws:
javax.resource.ResourceException
ResourceException

matchManagedConnections

public ManagedConnection matchManagedConnections(java.util.Set connectionSet,
                                                 javax.security.auth.Subject subject,
                                                 ConnectionRequestInfo info)
                                          throws ResourceException
Matches the managed connections
Parameters:
connectionSet - The connectionSet
subject - The connection subject
info - ConnectionRequestInfo
Returns:
Always null. This method does nothing in current implementation.
Throws:
javax.resource.ResourceException
ResourceException

setUserName

public void setUserName(java.lang.String userName)
                 throws ResourceException
Sets user name
Parameters:
userName - The user name
Throws:
ResourceException - Raised when any error occured.

getUserName

public java.lang.String getUserName()
                             throws ResourceException
Gets userName
Returns:
userName
Throws:
ResourceException - Raised when any error occured.

setPassword

public void setPassword(java.lang.String password)
                 throws ResourceException
Sets password
Parameters:
password - The password.
Throws:
ResourceException - Raised when any error occured.

getPassword

public java.lang.String getPassword()
                             throws ResourceException
Gets password
Returns:
password
Throws:
ResourceException - Raised when any error occured.

getTraceLevel

public int getTraceLevel()
Gets traceLevel
Returns:
traceLevel The trace level.

getInput

public java.lang.String getInput()
Gets input
Returns:
input The input.

setInput

public void setInput(java.lang.String theInput)
Sets input