|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.connector2.hod.J2HODBaseManagedConnectionFactory
This is a base class for other ManagedConnectionFactory classes.
The following table lists the base properties for all 3270, 5250, CICS and VT managed connection factories:
Property Name | Type |
Default |
Access |
---|---|---|---|
ConnectionTimeout | Integer | 60000 | get/set |
LogonLogoffClassName | String | "" | get/set |
Password | String | "" | get/set |
PortNumber | Integer | ECLSession.SESSION_3270_HOST_PORT_DEFAULT | get/set |
Reauthentication | boolean | true | get/set |
ServerName | String | "" | get/set |
SessionName | String | "" | get/set |
SSL | Boolean | false | get/set |
SSLServerAuthentication | Boolean | false | get/set |
TraceLevel | Integer | RAS_TRACE_ERROR_EXCEPTION | get/set |
UserName | String | "" | get/set |
UseUserData | Boolean | false | get/set |
Field Summary | |
static int |
CONNECTION_TIMEOUT_DEFAULT
Default connection time out value in milliseconds |
static int |
RAS_TRACE_ENTRY_EXIT
Define for tracelevel - Entry/exit trace |
static int |
RAS_TRACE_ERROR_EXCEPTION
Define for tracelevel - Error exception trace |
static int |
RAS_TRACE_INTERNAL
Define for tracelevel - HOD Connector internal trace |
static int |
RAS_TRACE_INTERNAL_NATIVE
Define for tracelevel - HOD native internal trace |
static int |
RAS_TRACE_OFF
Define for tracelevel - Trace turned off |
Constructor Summary | |
J2HODBaseManagedConnectionFactory()
J2HODBaseManagedConnectionFactory constructor. |
Method Summary | |
java.lang.Object |
createConnectionFactory()
Creates a Connection Factory instance. |
java.lang.Object |
createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
Creates a Connection Factory instance. |
boolean |
equals(java.lang.Object obj)
Check to see if this ManagedConnectionFactory is equal to another ManagedConnectionFactory, based on serverName, portNumber and logonLogoffClassName. |
java.lang.Integer |
getConnectionTimeout()
Gets the connectionTimeout property (java.lang.Integer) value. |
java.lang.String |
getLogonLogoffClassName()
Gets the logonLogoffClassName property (java.lang.String) value. |
java.io.PrintWriter |
getLogWriter()
Gets a logWriter. |
java.lang.String |
getPassword()
Gets the password property (java.lang.String) value. |
java.lang.Integer |
getPortNumber()
Gets the portNumber property (java.lang.Integer) value. |
java.lang.String |
getServerName()
Gets the serverName property (java.lang.String) value. |
java.lang.String |
getSessionName()
Gets the sessionName property (java.lang.String) value. |
java.lang.Boolean |
getSSL()
Gets the SSL property (java.lang.Boolean) value. |
java.lang.Boolean |
getSSLServerAuthentication()
Gets the SSLServerAuthentication property (java.lang.Boolean) value. |
java.lang.Integer |
getTraceLevel()
Gets the traceLevel property (java.lang.Integer) value. |
java.lang.String |
getUserName()
Gets the userName property (java.lang.String) value. |
java.lang.Boolean |
getUseUserData()
Gets the useUserData property (java.lang.Boolean) value. |
int |
hashCode()
Returns the hash code (serverName + portNumber) for the ManagedConnectionFactory. |
boolean |
isReauthentication()
Gets the reauthentication (boolean) value. |
javax.resource.spi.ManagedConnection |
matchManagedConnections(java.util.Set connectionSet,
javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo requestInfo)
This method selects the matching ManagedConnection from the candidate set provided by the caller. |
void |
setConnectionTimeout(java.lang.Integer connectionTimeout)
Sets the connectionTimeout property (java.lang.Integer) value. |
void |
setLogonLogoffClassName(java.lang.String logonLogoffClassName)
Sets the logonLogoffClassName property (java.lang.String) value. |
void |
setLogWriter(java.io.PrintWriter out)
Set the log writer for this ManagedConnectionFactory instance. |
void |
setPassword(java.lang.String password)
Sets the password property (java.lang.String) value. |
void |
setPortNumber(java.lang.Integer portNumber)
Sets the portNumber property (java.lang.Integer) value. |
void |
setReauthentication(boolean newReauthentication)
Sets the reauthentication property (java.lang.Boolean) value. |
void |
setServerName(java.lang.String serverName)
Sets the serverName property (java.lang.String) value. |
void |
setSessionName(java.lang.String sessionName)
Sets the sessionName property (java.lang.String) value. |
void |
setSSL(java.lang.Boolean SSL)
Sets the SSL property (java.lang.Boolean) value. |
void |
setSSLServerAuthentication(java.lang.Boolean SSLServerAuthentication)
Sets the SSLServerAuthentication property (java.lang.Boolean) value. |
void |
setTraceLevel(java.lang.Integer traceLevel)
Sets the traceLevel property (java.lang.Integer) value. |
void |
setUserName(java.lang.String userName)
Sets the userName property (java.lang.String) value. |
void |
setUseUserData(java.lang.Boolean useUserData)
Sets the useUserData property (java.lang.Boolean) value. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.resource.spi.ManagedConnectionFactory |
createManagedConnection |
Field Detail |
public static final int RAS_TRACE_OFF
public static final int RAS_TRACE_ERROR_EXCEPTION
public static final int RAS_TRACE_ENTRY_EXIT
public static final int RAS_TRACE_INTERNAL
public static final int RAS_TRACE_INTERNAL_NATIVE
public static final int CONNECTION_TIMEOUT_DEFAULT
Constructor Detail |
public J2HODBaseManagedConnectionFactory()
Method Detail |
public java.lang.Object createConnectionFactory() throws javax.resource.ResourceException
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
- - generic exceptionpublic java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager) throws javax.resource.ResourceException
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
cxManager
- javax.resource.spi.ConnectionManager - ConnectionManager to be associated with created J2HODConnectionFactory instancejavax.resource.ResourceException
- generic exceptionpublic java.lang.String getServerName()
setServerName(java.lang.String)
public java.lang.String getLogonLogoffClassName()
setLogonLogoffClassName(java.lang.String)
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
- public java.lang.String getPassword()
setPassword(java.lang.String)
public java.lang.Integer getPortNumber()
setPortNumber(java.lang.Integer)
public java.lang.String getSessionName()
setSessionName(java.lang.String)
public java.lang.Boolean getSSL()
setSSL(java.lang.Boolean)
public java.lang.Boolean getSSLServerAuthentication()
setSSLServerAuthentication(java.lang.Boolean)
public java.lang.Integer getTraceLevel()
setTraceLevel(java.lang.Integer)
public java.lang.String getUserName()
setUserName(java.lang.String)
public java.lang.Boolean getUseUserData()
setUseUserData(java.lang.Boolean)
public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo requestInfo) throws javax.resource.ResourceException
a) Connector does not support reauthentication i.e. the security info of the existing managed connection and the security info of the request have to match. The request security info can be read either from the Subject or the ConnectionRequestInfo. This value is compared with the security info of the ManagedConnection from the candidate set. If there is no match, method returns null to the caller. If the match is found, the next step is to match remining properties of the ConnectionRequestInfo. The Connector has the knowledge to verify that particluar value of the property can be overwritten so after finding compatible properties the ManagedConnection is returned to the caller. If there is no match or properties are not 'compatible', the method returns null. In case when ConnectionRequestInfo and Subject are null, the security info and properties of the ManagedConnections from the candidate set are compared with the default values of the ManagedConnectionFactory. If there is a match, the ManagedConnection is returned to the caller, otherwise null is returned.
b) Connector supports reauthentication - only properties from the ConnectionRequestInfo have to match. The Connector has the knowledge to verify that particluar value of the property can be overwritten so if it finds compatible properties, it overwrites them and then returns ManagedConnection to the caller. If there is no match or properties are not 'compatible', the method returns null. In case when ConnectionRequestInfo is null, the security info and properties of the ManagedConnections from the candidate set are compared with the default values of the ManagedConnectionFactory. If there is a match, the ManagedConnection is returned to the caller, otherwise null is returned.
matchManagedConnections
in interface javax.resource.spi.ManagedConnectionFactory
connectionSet
- java.util.Set - candidate connection setsubject
- javax.security.auth.Subject - caller's security informationrequestInfo
- ConnectionRequestInfo - additional resource adapter specific connection request informationjavax.resource.ResourceException
- - generic exceptionjava.lang.IllegalStateException
- - illegal state exceptionpublic void setServerName(java.lang.String serverName)
serverName
- java.lang.String - The new value for the propertygetServerName()
public void setLogonLogoffClassName(java.lang.String logonLogoffClassName)
logonLogoffClassName
- java.lang.String - The new value for the propertygetLogonLogoffClassName()
public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException
The log writer is a character output stream to which all logging and tracing messages for this ManagedConnectionfactory instance will be printed.
ApplicationServer manages the association of output stream with the ManagedConnectionFactory. When a ManagedConnectionFactory object is created the log writer is initially null, in other words, logging is disabled. Once a log writer is associated with a ManagedConnectionFactory, logging and tracing for ManagedConnectionFactory instance is enabled.
The ManagedConnection instances created by ManagedConnectionFactory "inherits" the log writer, which can be overridden by ApplicationServer using ManagedConnection.setLogWriter to set ManagedConnection specific logging and tracing.
setLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
out
- java.io.PrintWriter - an out stream for error logging and tracingjavax.resource.ResourceException
- - generic exceptionpublic void setPassword(java.lang.String password)
password
- java.lang.String - The new value for the propertygetPassword()
public void setPortNumber(java.lang.Integer portNumber)
portNumber
- java.lang.Integer - The new value for the propertygetPortNumber()
public void setSessionName(java.lang.String sessionName)
sessionName
- java.lang.String - The new value for the propertygetSessionName()
public void setSSL(java.lang.Boolean SSL)
SSL
- java.lang.Boolean - The new value for the propertygetSSL()
public void setSSLServerAuthentication(java.lang.Boolean SSLServerAuthentication)
SSLServerAuthentication
- java.lang.Boolean - The new value for the propertygetSSLServerAuthentication()
public void setTraceLevel(java.lang.Integer traceLevel)
traceLevel
- java.lang.Integer - The new trace level value for the propertygetTraceLevel()
public void setUserName(java.lang.String userName)
userName
- java.lang.String - The new user name value for the propertygetUserName()
public void setUseUserData(java.lang.Boolean useUserData)
useUserData
- java.lang.Boolean - The new value for the property.getUseUserData()
public boolean equals(java.lang.Object obj)
equals
in interface javax.resource.spi.ManagedConnectionFactory
equals
in class java.lang.Object
obj
- Object - the Object to compare withpublic java.lang.Integer getConnectionTimeout()
setConnectionTimeout(java.lang.Integer)
public int hashCode()
hashCode
in interface javax.resource.spi.ManagedConnectionFactory
hashCode
in class java.lang.Object
public boolean isReauthentication()
setReauthentication(boolean)
public void setConnectionTimeout(java.lang.Integer connectionTimeout)
connectionTimeout
- java.lang.Integer - The new connection timeout value for the propertygetConnectionTimeout()
public void setReauthentication(boolean newReauthentication)
newReauthentication
- boolean - The new value for the propertyisReauthentication()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |