|
||||||||||
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 |
PortNumberBackup1 | Integer | ECLSession.SESSION_3270_HOST_PORT_DEFAULT | get/set |
PortNumberBackup2 | Integer | ECLSession.SESSION_3270_HOST_PORT_DEFAULT | get/set |
Reauthentication | Boolean | true | get/set |
ServerName | String | "" | get/set |
ServerNameBackup1 | String | "" | get/set |
ServerNameBackup2 | String | "" | get/set |
SessionName | String | "" | get/set |
Security | Boolean | false | get/set |
SecurityProtocol | String | SESSION_PROTOCOL_TELNET | get/set |
SSLServerAuthentication | Boolean | false | get/set |
TraceLevel | Integer | RAS_TRACE_ERROR_EXCEPTION | get/set |
UserName | String | "" | 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 server names, port numbers 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.Integer |
getPortNumberBackup1()
Gets the portNumberBackup1 property (java.lang.Integer) value. |
java.lang.Integer |
getPortNumberBackup2()
Gets the portNumberBackup2 property (java.lang.Integer) value. |
java.lang.Boolean |
getReauthentication()
Gets the reauthentication (Boolean) value. |
java.lang.Boolean |
getSecurity()
Gets the security property (java.lang.Boolean) value. |
java.lang.String |
getSecurityProtocol()
Gets the security protocol property (java.lang.String) value. |
java.lang.String |
getServerName()
Gets the serverName property (java.lang.String) value. |
java.lang.String |
getServerNameBackup1()
Gets the serverNameBackup1 property (java.lang.String) value. |
java.lang.String |
getServerNameBackup2()
Gets the serverNameBackup2 property (java.lang.String) value. |
java.lang.String |
getSessionName()
Gets the sessionName property (java.lang.String) 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. |
int |
hashCode()
Returns the hash code (serverName + portNumber) for the ManagedConnectionFactory. |
java.lang.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)
Sets 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 |
setPortNumberBackup1(java.lang.Integer portNumber)
Sets the portNumberBackup1 property (java.lang.Integer) value. |
void |
setPortNumberBackup2(java.lang.Integer portNumber)
Sets the portNumberBackup2 property (java.lang.Integer) value. |
void |
setReauthentication(java.lang.Boolean newReauthentication)
Sets the reauthentication property (java.lang.Boolean) value. |
void |
setSecurity(java.lang.Boolean secure)
Sets the Security property (java.lang.Boolean) value. |
void |
setSecurityProtocol(java.lang.String sProtocol)
Sets the SecurityProtocol property (java.lang.Boolean) value. |
void |
setServerName(java.lang.String serverName)
Sets the serverName property (java.lang.String) value. |
void |
setServerNameBackup1(java.lang.String serverName)
Sets the serverNameBackup1 property (java.lang.String) value. |
void |
setServerNameBackup2(java.lang.String serverName)
Sets the serverNameBackup2 property (java.lang.String) value. |
void |
setSessionName(java.lang.String sessionName)
Sets the sessionName property (java.lang.String) value. |
void |
setSessionProperties(java.util.Properties p)
Sets Session (a Display Session) properties. |
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. |
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 getServerNameBackup1()
setServerNameBackup1(java.lang.String)
public java.lang.String getServerNameBackup2()
setServerNameBackup2(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
- setLogWriter(java.io.PrintWriter)
public java.lang.String getPassword()
setPassword(java.lang.String)
public java.lang.Integer getPortNumber()
setPortNumber(java.lang.Integer)
public java.lang.Integer getPortNumberBackup1()
setPortNumberBackup1(java.lang.Integer)
public java.lang.Integer getPortNumberBackup2()
setPortNumberBackup2(java.lang.Integer)
public java.lang.String getSessionName()
setSessionName(java.lang.String)
public java.lang.Boolean getSecurity()
setSecurity(java.lang.Boolean)
public java.lang.String getSecurityProtocol()
setSecurityProtocol(java.lang.String)
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 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 setServerNameBackup1(java.lang.String serverName)
serverName
- java.lang.String - The new value for the propertygetServerNameBackup1()
public void setServerNameBackup2(java.lang.String serverName)
serverNameBackup2
- java.lang.String - The new value for the propertygetServerNameBackup2()
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 exceptiongetLogWriter()
public 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 setPortNumberBackup1(java.lang.Integer portNumber)
portNumber
- java.lang.Integer - The new value for the propertygetPortNumberBackup1()
public void setPortNumberBackup2(java.lang.Integer portNumber)
portNumber
- java.lang.Integer - The new value for the propertygetPortNumberBackup2()
public void setSessionName(java.lang.String sessionName)
sessionName
- java.lang.String - The new value for the propertygetSessionName()
public void setSecurity(java.lang.Boolean secure)
secure
- java.lang.Boolean - The new value for the propertygetSecurity()
public void setSecurityProtocol(java.lang.String sProtocol)
sProtocol
- java.lang.Boolean - The new value for the propertygetSecurityProtocol()
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 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 java.lang.Boolean isReauthentication()
setReauthentication(java.lang.Boolean)
public java.lang.Boolean getReauthentication()
setReauthentication(java.lang.Boolean)
public void setConnectionTimeout(java.lang.Integer connectionTimeout)
connectionTimeout
- java.lang.Integer - The new connection timeout value for the propertygetConnectionTimeout()
public void setReauthentication(java.lang.Boolean newReauthentication)
newReauthentication
- Boolean - The new value for the propertyisReauthentication()
public void setSessionProperties(java.util.Properties p)
p
- java.util.Properties - Session bean properties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |