com.ibm.connector2.cics
Class ECIManagedConnectionFactory
- java.lang.Object
-
- com.ibm.connector2.cics.CICSManagedConnectionFactory
-
- com.ibm.connector2.cics.ECIManagedConnectionFactory
-
- All Implemented Interfaces:
- CICSLogTraceLevels, java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation, javax.resource.spi.TransactionSupport, javax.resource.spi.ValidatingManagedConnectionFactory
@ConnectionDefinition(connectionFactory=javax.resource.cci.ConnectionFactory.class, connectionFactoryImpl=ECIConnectionFactory.class, connection=javax.resource.cci.Connection.class, connectionImpl=ECIConnection.class) public final class ECIManagedConnectionFactory extends CICSManagedConnectionFactory implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.TransactionSupportAn 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
-
-
Field Summary
-
Fields inherited from interface com.ibm.connector2.cics.CICSLogTraceLevels
RAS_TRACE_ENTRY_EXIT, RAS_TRACE_ERROR_EXCEPTION, RAS_TRACE_INTERNAL, RAS_TRACE_OFF
-
-
Constructor Summary
Constructors Constructor and Description ECIManagedConnectionFactory()
-
Method Summary
Methods Modifier and Type Method and Description java.lang.ObjectcreateConnectionFactory()This method is the default route to creating ECIConnectionFactory objects.java.lang.ObjectcreateConnectionFactory(javax.resource.spi.ConnectionManager cm)This method allows a ConnectionManager to be specified as the one to be used by the returned ECIConnectionFactory.booleanequals(java.lang.Object inObj)This method returns true if two ECIManagedConnectionFactory objects are equal.java.lang.IntegergetIpicHeartbeatInterval()Getter for the heartbeat interval, in seconds, when using an IPIC connection to CICS in local mode.java.lang.IntegergetIpicSendSessions()Getter for the maximum number of send sessions when using an IPIC connection to CICS in local mode.java.lang.StringgetTPNName()Accessor for TPNName.java.lang.StringgetTraceRequests()Getter for the maximum number of send sessions when using an IPIC connection to CICS in local mode.java.lang.StringgetTranName()Accessor for tranName.java.lang.StringgetXaSupport()Accessor for the XA Support custom property.inthashCode()Returns a hashcode based on all configurable properties.voidsetApplid(java.lang.String newApplid)Set the applid for this connection.voidsetApplidQualifier(java.lang.String newApplidHLQ)Set the applid qualifier for this connection.voidsetCipherSuites(java.lang.String cipherSuites)Set the cipher suites a SSL connection is able to use.voidsetClientSecurity(java.lang.String newClSec)Set the client security class name to be used.voidsetConnectionURL(java.lang.String newURL)Set the CICS TG gateway URL.voidsetInterceptPlugin(java.lang.String interceptPlugin)Sets the name of theGatewayInterceptplug-in class for this managed connection factory.voidsetIpicHeartbeatInterval(java.lang.Integer heartbeatInterval)Setter for the heartbeat interval, in seconds, when using an IPIC connection to CICS in local mode.voidsetIpicSendSessions(java.lang.Integer sendSessions)Setter for maximum number of send sessions when using an IPIC connection to CICS in local mode.voidsetKeyRingClass(java.lang.String newKeyRing)Set the key ring class name to use for an SSL connection.voidsetKeyRingPassword(java.lang.String newPassword)Set the key ring password to use for an SSL connection.voidsetPassword(java.lang.String newPassword)Set the password or password phrase for this connection.voidsetPortNumber(java.lang.String newPort)Set the port to communicate with the CICS TG on.voidsetRequestExits(java.lang.String newRequestExits)Set the requestExits for this connection.voidsetServerName(java.lang.String newServer)Set the server to connect to (this name must be defined in the CICS TG config).voidsetServerSecurity(java.lang.String newSvrSec)Set the server security class name to be used.voidsetSocketConnectTimeout(java.lang.String newTimeout)Sets the socket connection timeout value for a connection to CICS TG.voidsetTPNName(java.lang.String name)Setter for TPNName.voidsetTraceLevel(java.lang.Integer newLevel)Set the trace level for this managed connection factory and anything it creates.voidsetTraceRequests(java.lang.String newTraceRequests)Set the traceRequests property for this connection.voidsetTranName(java.lang.String name)Setter for tranName.voidsetUserName(java.lang.String newUser)Set the username for this connection.voidsetXaSupport(java.lang.String xaSupport)Setter for whether XA support should be enabled on this ManagedConnectionFactory.java.lang.StringtoString()Returns a string representation of this object.-
Methods inherited from class com.ibm.connector2.cics.CICSManagedConnectionFactory
addPropertyChangeListener, firePropertyChange, getApplid, getApplidQualifier, getCipherSuites, getClientSecurity, getConnectionURL, getInterceptPlugin, getInvalidConnections, getKeyRingClass, getKeyRingPassword, getLogHelper, getLogWriter, getPassword, getPortNumber, getRequestExits, getServerName, getServerSecurity, getSocketConnectTimeout, getTraceLevel, getUserName, removePropertyChangeListener, setLogWriter
-
-
-
-
Method Detail
-
createConnectionFactory
public java.lang.Object createConnectionFactory() throws javax.resource.ResourceExceptionThis 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:
createConnectionFactoryin interfacejavax.resource.spi.ManagedConnectionFactory- Returns:
- The new ECIConnectionFactory object.
- Throws:
javax.resource.ResourceException
-
hashCode
public int hashCode()
Returns a hashcode based on all configurable properties.- Specified by:
hashCodein interfacejavax.resource.spi.ManagedConnectionFactory- Overrides:
hashCodein classCICSManagedConnectionFactory- Returns:
- A hashcode for this instance.
-
createConnectionFactory
public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cm) throws javax.resource.ResourceExceptionThis method allows a ConnectionManager to be specified as the one to be used by the returned ECIConnectionFactory.- Specified by:
createConnectionFactoryin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
cm- The ConnectionManager object to associate with the new ECIConnectionFactory.- Returns:
- The new ECIConnectionFactory object.
- Throws:
javax.resource.ResourceException
-
equals
public boolean equals(java.lang.Object inObj)
This method returns true if two ECIManagedConnectionFactory objects are equal.- Specified by:
equalsin interfacejavax.resource.spi.ManagedConnectionFactory- Overrides:
equalsin classCICSManagedConnectionFactory- Parameters:
inObj- The object to be tested for equality.- Returns:
- Whether the ECIManagedConnectionFactory is equal to the supplied object.
-
toString
public java.lang.String toString()
Returns a string representation of this object.- Overrides:
toStringin classCICSManagedConnectionFactory- Returns:
- A string representation of this object.
-
getTranName
public java.lang.String 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
public java.lang.String 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.
-
setTranName
@ConfigProperty(description="The transaction identifier placed in EIBTRNID by CICS for the mirror transaction", type=java.lang.String.class) public void setTranName(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String newRequestExits)Set the requestExits for this connection.- Parameters:
newRequestExits- The new requestExits.
-
setTraceRequests
public void setTraceRequests(java.lang.String newTraceRequests)
Set the traceRequests property for this connection.- Parameters:
newTraceRequests- The new traceRequests value.
-
getTraceRequests
public java.lang.String getTraceRequests()
Getter for the maximum number of send sessions when using an IPIC connection to CICS in local mode.- Returns:
- the number of send sessions
-
setApplid
@ConfigProperty(description="The APPLID for application using this connection", type=java.lang.String.class) public void setApplid(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String newTimeout) throws javax.resource.spi.InvalidPropertyExceptionSets 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:
javax.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.Integer newLevel)Set the trace level for this managed connection factory and anything it creates.- Parameters:
newLevel- The trace level to use.- See Also:
CICSLogTraceLevels
-
setXaSupport
@ConfigProperty(description="This connection uses XA transactions", type=java.lang.String.class, defaultValue="off") public void setXaSupport(java.lang.String xaSupport)Setter for whether XA support should be enabled on this ManagedConnectionFactory.- Parameters:
xaSupport- The valueon
will enable XA transactions, none will enable NoTransaction all other values will cause the ConnectionFactory to use LocalTransactions
-
getXaSupport
public java.lang.String getXaSupport()
Accessor for the XA Support custom property.- Returns:
- The value of the XA Support 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(java.lang.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
public java.lang.Integer 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(java.lang.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
public java.lang.Integer 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
-
setInterceptPlugin
@ConfigProperty(description="The class name of the Gateway intercept plug-in", type=java.lang.String.class) public void setInterceptPlugin(java.lang.String interceptPlugin)Sets the name of theGatewayInterceptplug-in class for this managed connection factory.- Parameters:
interceptPlugin- the name of the Gateway intercept plug-in class
-
-