Package com.ibm.jakarta.connector2.cics
Class ECIManagedConnectionFactory
java.lang.Object
com.ibm.jakarta.connector2.cics.CICSManagedConnectionFactory
com.ibm.jakarta.connector2.cics.ECIManagedConnectionFactory
- All Implemented Interfaces:
CICSLogTraceLevels
,jakarta.resource.spi.ManagedConnectionFactory
,jakarta.resource.spi.ResourceAdapterAssociation
,jakarta.resource.spi.TransactionSupport
,jakarta.resource.spi.ValidatingManagedConnectionFactory
,Serializable
@ConnectionDefinition(connectionFactory=jakarta.resource.cci.ConnectionFactory.class,
connectionFactoryImpl=ECIConnectionFactory.class,
connection=jakarta.resource.cci.Connection.class,
connectionImpl=ECIConnection.class)
public final class ECIManagedConnectionFactory
extends CICSManagedConnectionFactory
implements jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.TransactionSupport
An ECIManagedConnectionFactory is used to create ECI connections to
the CICS Transaction Gateway. In managed mode this is controlled by the
JEE application server and properties are set by configuring the
ConnectionFactory objects via the application server. In non-managed mode
the client application is required to create an instance of this class and
set the relevant properties itself. Once this is done a ConnectionFactory
object can be obtained which will inherit these properties.
For the CICS TS local resource adapter, no properties are used
For the CICS TS remote resource adapter, selected properties are available
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.resource.spi.TransactionSupport
jakarta.resource.spi.TransactionSupport.TransactionSupportLevel
-
Field Summary
FieldsFields inherited from interface com.ibm.jakarta.connector2.cics.CICSLogTraceLevels
RAS_TRACE_ENTRY_EXIT, RAS_TRACE_ERROR_EXCEPTION, RAS_TRACE_INTERNAL, RAS_TRACE_OFF
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method is the default route to creating ECIConnectionFactory objects.createConnectionFactory
(jakarta.resource.spi.ConnectionManager cm) This method allows a ConnectionManager to be specified as the one to be used by the returned ECIConnectionFactory.jakarta.resource.spi.ManagedConnection
createManagedConnection
(Subject security, jakarta.resource.spi.ConnectionRequestInfo request) When no ECIManagedConnections matching the requirements laid down in the security or request parameters are found, this method is used to create a new ECIManagedConnection object.boolean
This method returns true if two ECIManagedConnectionFactory objects are equal.Getter for the heartbeat interval, in seconds, when using an IPIC connection to CICS in local mode.Getter for the maximum number of send sessions when using an IPIC connection to CICS in local mode.Accessor for TPNName.Get the traceRequests property for this connection.Accessor for the TrackingToken custom property.Accessor for tranName.jakarta.resource.spi.TransactionSupport.TransactionSupportLevel
Accessor for the XA Support custom property.int
hashCode()
Returns a hashcode based on all configurable properties.jakarta.resource.spi.ManagedConnection
matchManagedConnections
(Set connections, Subject security, jakarta.resource.spi.ConnectionRequestInfo request) In order for a generic JEE environment to successfully match a connection request to a ManagedConnection implementation it must delegate to the specific Resource Adapter.void
Set the applid for this connection.void
setApplidQualifier
(String newApplidHLQ) Set the applid qualifier for this connection.void
setCipherSuites
(String cipherSuites) Set the cipher suites a SSL connection is able to use.void
setClientSecurity
(String newClSec) Set the client security class name to be used.void
setConnectionURL
(String newURL) Set the CICS TG gateway URL.void
setInterceptPlugin
(String interceptPlugin) Sets the name of theGatewayIntercept
plug-in class for this managed connection factory.void
setIpicHeartbeatInterval
(Integer heartbeatInterval) Setter for the heartbeat interval, in seconds, when using an IPIC connection to CICS in local mode.void
setIpicSendSessions
(Integer sendSessions) Setter for maximum number of send sessions when using an IPIC connection to CICS in local mode.void
setKeyRingClass
(String newKeyRing) Set the key ring class name to use for an SSL connection.void
setKeyRingPassword
(String newPassword) Set the key ring password to use for an SSL connection.void
setPassword
(String newPassword) Set the password or password phrase for this connection.void
setPortNumber
(String newPort) Set the port to communicate with the CICS TG on.void
setRequestExits
(String newRequestExits) Set the requestExits for this connection.void
setServerName
(String newServer) Set the server to connect to (this name must be defined in the CICS TG config).void
setServerSecurity
(String newSvrSec) Set the server security class name to be used.void
setSocketConnectTimeout
(String newTimeout) Sets the socket connection timeout value for a connection to CICS TG.void
setTPNName
(String name) Setter for TPNName.void
setTraceLevel
(Integer newLevel) Set the trace level for this managed connection factory and anything it creates.void
setTraceRequests
(String newTraceRequests) Set the traceRequests property for this connection.void
setTrackingToken
(String trackingToken) Enable Tracking Token for this connection.void
setTranName
(String name) Setter for tranName.void
setUserName
(String newUser) Set the username for this connection.void
setXaSupport
(String xaSupport) Setter for whether XA support should be enabled on this ManagedConnectionFactory.toString()
Returns a string representation of this object.Methods inherited from class com.ibm.jakarta.connector2.cics.CICSManagedConnectionFactory
addPropertyChangeListener, firePropertyChange, getApplid, getApplidQualifier, getCipherSuites, getClientSecurity, getConnectionURL, getInterceptPlugin, getInvalidConnections, getKeyRingClass, getKeyRingPassword, getLogHelper, getLogWriter, getPassword, getPortNumber, getRequestExits, getResourceAdapter, getServerName, getServerSecurity, getSocketConnectTimeout, getTraceLevel, getTrackingToken, getUserName, removePropertyChangeListener, setLogWriter, setResourceAdapter
Methods inherited from interface jakarta.resource.spi.ManagedConnectionFactory
getLogWriter, setLogWriter
-
Field Details
-
CLASS_VERSION
- See Also:
-
-
Constructor Details
-
ECIManagedConnectionFactory
public ECIManagedConnectionFactory()
-
-
Method Details
-
createConnectionFactory
This method is the default route to creating ECIConnectionFactory objects. The returned object will be associated with the supplied DefaultConnectionManager that it will use in its factory methods. If this method is invoked then it implies we are in non managed mode.- Specified by:
createConnectionFactory
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Returns:
- The new ECIConnectionFactory object.
- Throws:
jakarta.resource.ResourceException
-
hashCode
public int hashCode()Returns a hashcode based on all configurable properties.- Specified by:
hashCode
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Overrides:
hashCode
in classCICSManagedConnectionFactory
- Returns:
- A hashcode for this instance.
-
createConnectionFactory
public Object createConnectionFactory(jakarta.resource.spi.ConnectionManager cm) throws jakarta.resource.ResourceException This method allows a ConnectionManager to be specified as the one to be used by the returned ECIConnectionFactory.- Specified by:
createConnectionFactory
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
cm
- The ConnectionManager object to associate with the new ECIConnectionFactory.- Returns:
- The new ECIConnectionFactory object.
- Throws:
jakarta.resource.ResourceException
-
createManagedConnection
public jakarta.resource.spi.ManagedConnection createManagedConnection(Subject security, jakarta.resource.spi.ConnectionRequestInfo request) throws jakarta.resource.ResourceException When no ECIManagedConnections matching the requirements laid down in the security or request parameters are found, this method is used to create a new ECIManagedConnection object.- Specified by:
createManagedConnection
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
security
- A system supplied set of security credentials.request
- An ECIConnectionRequestInfo object containing the client components security credentials if supplied.- Returns:
- A new logged on ECIManagedConnection object.
- Throws:
jakarta.resource.ResourceException
- Thrown when the parameters are not of the required type.
-
matchManagedConnections
public jakarta.resource.spi.ManagedConnection matchManagedConnections(Set connections, Subject security, jakarta.resource.spi.ConnectionRequestInfo request) In order for a generic JEE environment to successfully match a connection request to a ManagedConnection implementation it must delegate to the specific Resource Adapter. This method is used in that delegation to match one of the supplied ManagedConnection objects to the properties defined in the deployed Resource Adapter.- Specified by:
matchManagedConnections
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Parameters:
connections
- The java.util.Set of candidate ManagedConnection objects that are to be tested for a match.security
- A possibly null set of security credentialsrequest
- An ECIConnectionRequestInfo object- Returns:
- An ECIManagedConnection object if a successful match is made otherwise null
-
equals
This method returns true if two ECIManagedConnectionFactory objects are equal.- Specified by:
equals
in interfacejakarta.resource.spi.ManagedConnectionFactory
- Overrides:
equals
in classCICSManagedConnectionFactory
- Parameters:
inObj
- The object to be tested for equality.- Returns:
- Whether the ECIManagedConnectionFactory is equal to the supplied object.
-
toString
Returns a string representation of this object.- Overrides:
toString
in classCICSManagedConnectionFactory
- Returns:
- A string representation of this object.
-
getTranName
Accessor for tranName. The called program runs under the default mirror transaction, but is linked to under the tranName transaction name. This name is available to the called program in the exec interface block (EIB) for querying the transaction ID.- Returns:
- The current tranName to run under.
-
getTPNName
Accessor for TPNName. This is the name of the CICS mirror transaction that the called program will run under. This option is like the TRANSID option on an EXEC CICS LINK command. A transaction definition in CICS for this TRANSID must point to the DFHMIRS program. Note that TPNName takes precedence if both TranName and TPNName are specified.- Returns:
- The current TPNName to run under.
-
getRRSTransactional
-
getThreadIdentitySupport
-
setTranName
@ConfigProperty(description="The transaction identifier placed in EIBTRNID by CICS for the mirror transaction", type=java.lang.String.class) public void setTranName(String name) Setter for tranName. The called program runs under the default mirror transaction, but is linked to under the tranName transaction name. This name is available to the called program in the exec interface block (EIB) for querying the transaction ID.- Parameters:
name
- The new tranName to use.
-
setTPNName
@ConfigProperty(description="The transaction identifier of the CICS mirror transaction", type=java.lang.String.class) public void setTPNName(String name) Setter for TPNName. This is the name of the CICS mirror transaction that the called program will run under. This option is like the TRANSID option on an EXEC CICS LINK command. A transaction definition in CICS for this TRANSID must point to the DFHMIRS program. Note that TPNName takes precedence if both TranName and TPNName are specified.- Parameters:
name
- The new TPNName to use.
-
setConnectionURL
@ConfigProperty(description="The URL of the CICS Transaction Gateway for this connection", type=java.lang.String.class, defaultValue="local:") public void setConnectionURL(String newURL) Set the CICS TG gateway URL.- Parameters:
newURL
- The new CICS TG gateway URL.
-
setServerName
@ConfigProperty(description="The name of the target CICS server for this connection", type=java.lang.String.class) public void setServerName(String newServer) Set the server to connect to (this name must be defined in the CICS TG config). The server used by the Gateway daemon may be changed depending on the high availability configuration.- Parameters:
newServer
- The server to connect to.
-
setUserName
@ConfigProperty(description="The default user name that requests through this connection use", type=java.lang.String.class) public void setUserName(String newUser) Set the username for this connection.- Parameters:
newUser
- The new username.
-
setRequestExits
@ConfigProperty(description="The class name of the request exits called during the execution of interactions", type=java.lang.String.class) public void setRequestExits(String newRequestExits) Set the requestExits for this connection.- Parameters:
newRequestExits
- The new requestExits.
-
setTraceRequests
Set the traceRequests property for this connection.- Parameters:
newTraceRequests
- The new traceRequests value.
-
getTraceRequests
Get the traceRequests property for this connection.- Returns:
- the value of traceRequests property.
-
setApplid
@ConfigProperty(description="The APPLID for application using this connection", type=java.lang.String.class) public void setApplid(String newApplid) Set the applid for this connection.- Parameters:
newApplid
- The new applid.
-
setApplidQualifier
@ConfigProperty(description="The APPLID qualifier for applications using this connection", type=java.lang.String.class) public void setApplidQualifier(String newApplidHLQ) Set the applid qualifier for this connection.- Parameters:
newApplidHLQ
- The new applid qualifier.
-
setPassword
@ConfigProperty(description="The default password or password phrase that requests through this connection use", type=java.lang.String.class) public void setPassword(String newPassword) Set the password or password phrase for this connection. The maximum supported password or password phrase length varies by CICS server and communication protocol. Refer to your CICS server documentation for details.- Parameters:
newPassword
- The new password or password phrase.
-
setPortNumber
@ConfigProperty(description="The port number of the CICS Transaction Gateway for this connection", type=java.lang.String.class) public void setPortNumber(String newPort) Set the port to communicate with the CICS TG on. Default is 2006 for negative or non numeric values.- Parameters:
newPort
- The new port number.
-
setSocketConnectTimeout
@ConfigProperty(description="The number of milliseconds to wait while connecting to a Gateway daemon", type=java.lang.String.class) public void setSocketConnectTimeout(String newTimeout) throws jakarta.resource.spi.InvalidPropertyException Sets the socket connection timeout value for a connection to CICS TG. This timeout represents the maximum amount of time (in milliseconds) a managed connection will attempt to open a socket connection successfully to a remote Gateway daemon. The timeout is ignored for attempted connections to a local Gateway instance.- Parameters:
newTimeout
- The timeout value (in milliseconds). A value of 0 represents no timeout. Note the value is passed as a String- Throws:
jakarta.resource.spi.InvalidPropertyException
- If a negative value is passed
-
setClientSecurity
@ConfigProperty(description="The class name of the client security exit for this connection", type=java.lang.String.class) public void setClientSecurity(String newClSec) Set the client security class name to be used.- Parameters:
newClSec
- The client security class name.
-
setServerSecurity
@ConfigProperty(description="The class name of the server security exit for this connection requires the Gateway daemon to use", type=java.lang.String.class) public void setServerSecurity(String newSvrSec) Set the server security class name to be used.- Parameters:
newSvrSec
- The server security class name.
-
setKeyRingClass
@ConfigProperty(description="The location of the key store containing the certificates required for an SSL connection. On z/OS an ESM key store can be specified by prefixing the key store name with \"ESM:\".", type=java.lang.String.class) public void setKeyRingClass(String newKeyRing) Set the key ring class name to use for an SSL connection. On z/OS this can be set to an External Security Manager (ESM) key store by prefixing the key store name with"ESM:"
.- Parameters:
newKeyRing
- The key ring name.
-
setKeyRingPassword
@ConfigProperty(description="The password required to access the key store for an SSL connection. Not required when an ESM key store is used on z/OS.", type=java.lang.String.class) public void setKeyRingPassword(String newPassword) Set the key ring password to use for an SSL connection. When using an External Security Manager (ESM) key store on z/OS, no password is required.- Parameters:
newPassword
- The key ring password.
-
setCipherSuites
@ConfigProperty(description="The cipher suites available for an SSL connection", type=java.lang.String.class) public void setCipherSuites(String cipherSuites) Set the cipher suites a SSL connection is able to use.- Parameters:
cipherSuites
- A comma delimited list of cipher suites.
-
setTraceLevel
@ConfigProperty(description="The level of CICS Transaction Gateway diagnostic trace detail", type=java.lang.Integer.class) public void setTraceLevel(Integer newLevel) Set the trace level for this managed connection factory and anything it creates.- Parameters:
newLevel
- The trace level to use.- See Also:
-
setXaSupport
@ConfigProperty(description="This connection uses XA transactions", type=java.lang.String.class, defaultValue="off") public void setXaSupport(String xaSupport) Setter for whether XA support should be enabled on this ManagedConnectionFactory.- Parameters:
xaSupport
- The valueon
will enabled XA transactions all other values will cause the ConnectionFactory to use LocalTransactions
-
getXaSupport
Accessor for the XA Support custom property.- Returns:
- The value of the XA Support custom property.
-
setTrackingToken
@ConfigProperty(description="Enable Tracking Token", type=java.lang.String.class, defaultValue="false") public void setTrackingToken(String trackingToken) Enable Tracking Token for this connection.- Parameters:
trackingToken
- Enable Tracking Token.
-
getTrackingtoken
Accessor for the TrackingToken custom property.- Returns:
- The value of the TrackingToken custom property.
-
setIpicSendSessions
@ConfigProperty(description="For local mode, the number of simultaneous transactions or CICS tasks that are allowed over the connection when using an IPIC connection", type=java.lang.Integer.class, defaultValue="100") public void setIpicSendSessions(Integer sendSessions) Setter for maximum number of send sessions when using an IPIC connection to CICS in local mode. The number of send sessions controls the number of simultaneous transactions or CICS tasks that are allowed over the connection.- Parameters:
sendSessions
- the number of send sessions, which must be positive
-
getIpicSendSessions
Getter for the maximum number of send sessions when using an IPIC connection to CICS in local mode.- Returns:
- the number of send sessions
-
setIpicHeartbeatInterval
@ConfigProperty(description="For local mode, the heartbeat interval when using an IPIC connection", type=java.lang.Integer.class, defaultValue="30") public void setIpicHeartbeatInterval(Integer heartbeatInterval) Setter for the heartbeat interval, in seconds, when using an IPIC connection to CICS in local mode. Specify zero to disable IPIC heartbeats.- Parameters:
heartbeatInterval
- the heartbeat interval in seconds, in the range 0 to 3600
-
getIpicHeartbeatInterval
Getter for the heartbeat interval, in seconds, when using an IPIC connection to CICS in local mode. A value of zero indicates IPIC heartbeats are disabled.- Returns:
- the heartbeat interval in seconds, in the range 0 to 3600
-
getTransactionSupport
public jakarta.resource.spi.TransactionSupport.TransactionSupportLevel getTransactionSupport()- Specified by:
getTransactionSupport
in interfacejakarta.resource.spi.TransactionSupport
-
setInterceptPlugin
@ConfigProperty(description="The class name of the Gateway intercept plug-in", type=java.lang.String.class) public void setInterceptPlugin(String interceptPlugin) Sets the name of theGatewayIntercept
plug-in class for this managed connection factory.- Parameters:
interceptPlugin
- the name of the Gateway intercept plug-in class
-