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
  • Field Details

  • Constructor Details

    • ECIManagedConnectionFactory

      public ECIManagedConnectionFactory()
  • Method Details

    • createConnectionFactory

      public Object createConnectionFactory() throws jakarta.resource.ResourceException
      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 interface jakarta.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 interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      hashCode in class CICSManagedConnectionFactory
      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 interface jakarta.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 interface jakarta.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 interface jakarta.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 credentials
      request - An ECIConnectionRequestInfo object
      Returns:
      An ECIManagedConnection object if a successful match is made otherwise null
    • equals

      public boolean equals(Object inObj)
      This method returns true if two ECIManagedConnectionFactory objects are equal.
      Specified by:
      equals in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      equals in class CICSManagedConnectionFactory
      Parameters:
      inObj - The object to be tested for equality.
      Returns:
      Whether the ECIManagedConnectionFactory is equal to the supplied object.
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class CICSManagedConnectionFactory
      Returns:
      A string representation of this object.
    • getTranName

      public 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 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.
    • getRRSTransactional

      public Boolean getRRSTransactional()
    • getThreadIdentitySupport

      public String 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

      public void setTraceRequests(String newTraceRequests)
      Set the traceRequests property for this connection.
      Parameters:
      newTraceRequests - The new traceRequests value.
    • getTraceRequests

      public String 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 value
       on
       
      will enabled XA transactions all other values will cause the ConnectionFactory to use LocalTransactions
    • getXaSupport

      public String 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

      public String 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

      public 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(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 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
    • getTransactionSupport

      public jakarta.resource.spi.TransactionSupport.TransactionSupportLevel getTransactionSupport()
      Specified by:
      getTransactionSupport in interface jakarta.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 the GatewayIntercept plug-in class for this managed connection factory.
      Parameters:
      interceptPlugin - the name of the Gateway intercept plug-in class