Class EPIManagedConnectionFactory

java.lang.Object
com.ibm.jakarta.connector2.cics.CICSManagedConnectionFactory
com.ibm.jakarta.connector2.cics.EPIManagedConnectionFactory
All Implemented Interfaces:
CICSLogTraceLevels, jakarta.resource.spi.ManagedConnectionFactory, jakarta.resource.spi.ResourceAdapterAssociation, jakarta.resource.spi.ValidatingManagedConnectionFactory, Serializable

@ConnectionDefinition(connectionFactory=jakarta.resource.cci.ConnectionFactory.class, connectionFactoryImpl=EPIConnectionFactory.class, connection=jakarta.resource.cci.Connection.class, connectionImpl=EPIConnection.class) public final class EPIManagedConnectionFactory extends CICSManagedConnectionFactory implements jakarta.resource.spi.ManagedConnectionFactory
An EPIManagedConnectionFactory is used to create EPI 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.
  • Field Details

  • Constructor Details

    • EPIManagedConnectionFactory

      public EPIManagedConnectionFactory()
      Default constructor. All properties must be configured via the setters as this object won't be valid until properties have been set.
  • Method Details

    • setSignonType

      @ConfigProperty(description="The sign-on capability for terminal install requests", type=java.lang.Integer.class, defaultValue="0") public void setSignonType(Integer newSignon)
      Set the sign on type:
      0 = Signon Capable
      1 = Signon InCapable

      Invalid value results in Signon Capable.

      Parameters:
      newSignon - The sign on type required
    • getSignonType

      public Integer getSignonType()
      Return the sign on type:

      0 = Signon Capable
      1 = Signon Incapable

      Returns:
      Signon Type.
    • setEncoding

      @ConfigProperty(description="The code page for terminal install requests", type=java.lang.String.class) public void setEncoding(String strEncoding)
      Set the encoding you wish to have the 3270 datastreams converted to and send to the CICS server. The encodings should be one of the java encodings. Not all are supported by this resource adapter and you must ensure your CICS server supports it as well.
      Parameters:
      strEncoding - The Java Encoding to use for 3270 datastreams.
    • getEncoding

      public String getEncoding()
      Return the current encoding.
      Returns:
      Current encoding.
    • setDeviceType

      @ConfigProperty(description="The CICS model terminal definition for terminal install requests", type=java.lang.String.class) public void setDeviceType(String strDevice)
      Set the device type that terminals created through this factory should use.
      Parameters:
      strDevice - The device type.
    • getDeviceType

      public String getDeviceType()
      Return the current device type.
      Returns:
      The current device type.
    • setLogonLogoffClass

      @ConfigProperty(description="The name of the LogonLogoff class to use for security", type=java.lang.String.class) public void setLogonLogoffClass(String strLogonLogoff)
      Set the logonLogoff class to be instantiated and called if a signon capable or signon unknown terminal is created.
      Parameters:
      strLogonLogoff - The fully qualified class name.
    • getLogonLogoffClass

      public String getLogonLogoffClass()
      Return the current logonLogoff class name.
      Returns:
      The logonlogoff class name.
    • setReadTimeout

      @ConfigProperty(description="The number of seconds the connection waits for a response from the Client application", type=java.lang.Integer.class) public void setReadTimeout(Integer iReadTimeout)
      Set the read timeout. This value, in seconds, defines the maximum time allowed to wait within a conversational transaction with no reply, before the transaction is abended. Range is 0 - 3600. If < 0 the value is set to 0. If > 3600 the value is set to 3600.
      Parameters:
      iReadTimeout - The read timeout value in seconds.
    • getReadTimeout

      public Integer getReadTimeout()
      Returns the current read timeout value in seconds.
      Returns:
      The current read timeout in seconds.
    • setInstallTimeout

      @ConfigProperty(description="The number of seconds the connection waits for a terminal to be installed", type=java.lang.Integer.class) public void setInstallTimeout(Integer iInstallTimeout)
      Set the install timeout. This value, in seconds, defines the maximum time to wait for a terminal to install before giving up and no terminal being returned Range is 0 - 3600. If < 0 the value is set to 0. If > 3600 the value is set to 3600.
      Parameters:
      iInstallTimeout - The install timeout in seconds.
    • getInstallTimeout

      public Integer getInstallTimeout()
      Get the install timeout value in seconds.
      Returns:
      The install timeout in seconds.
    • createConnectionFactory

      public Object createConnectionFactory() throws jakarta.resource.ResourceException
      This will create an EPIConnectionFactory. An application will obtain one of these and use it to create connections associated with managed connections that are created by this factory.

      This method creates a connection factory in a non-managed environment, so a supplied default connection manager is used rather than an application server environment.

      Specified by:
      createConnectionFactory in interface jakarta.resource.spi.ManagedConnectionFactory
      Throws:
      jakarta.resource.ResourceException
    • createConnectionFactory

      public Object createConnectionFactory(jakarta.resource.spi.ConnectionManager manager) throws jakarta.resource.ResourceException
      This will create an EPIConnectionFactory. An application will obtain one of these and use it to create connections associated with managed connections that are created by this factory.

      This method creates a connection factory in a managed environment, so will be invoked by an application server, providing it's own connection manager.

      Specified by:
      createConnectionFactory in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      manager - A suitable ConnectionManager to be associated with the EPIConnectionFactory.
      Throws:
      jakarta.resource.ResourceException
    • matchManagedConnections

      public jakarta.resource.spi.ManagedConnection matchManagedConnections(Set managedConns, Subject security, jakarta.resource.spi.ConnectionRequestInfo connReq)
      This will attempt to match a set of managed connections. It checks to see that the managed connection could have come from this factory. Next it checks to see if it can accomodate the requested connectionSpec parameters. Security and install timeout are not checked for.
      Specified by:
      matchManagedConnections in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      managedConns - The set of managed connections to match.
      security - Security Subject provided by the application server.
      connReq - the connection Request Info.
      Returns:
      a managed connection if one found, null otherwise.
    • createManagedConnection

      public jakarta.resource.spi.ManagedConnection createManagedConnection(Subject security, jakarta.resource.spi.ConnectionRequestInfo connReq)
      This creates new managed connections. It will create a managed connection with the correct security properties and other properties from the ConnectionSpec provided by the application. All other properties come from this manager.
      Specified by:
      createManagedConnection in interface jakarta.resource.spi.ManagedConnectionFactory
      Parameters:
      security - A security context for the managed connection.
      connReq - A Connection Request Info object.
      Returns:
      a Managed Connection.
    • equals

      public boolean equals(Object inObj)
      Returns true if all the configurable properties are equal.
      Specified by:
      equals in interface jakarta.resource.spi.ManagedConnectionFactory
      Overrides:
      equals in class CICSManagedConnectionFactory
      Returns:
      True if all configurable properties are equal.
    • 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.
    • toString

      public String toString()
      Return a string representation of this class. This will return a string containing all the relevant property contents of this class.
      Overrides:
      toString in class CICSManagedConnectionFactory
      Returns:
      A string representation of this instance.
    • setConnectionURL

      @ConfigProperty(description="The URL of the CICS Transaction Gateway for this connection", type=java.lang.String.class) 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). If this is left unset, the default server defined in the gateway is used.
      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.
    • 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 that requests through this connection use", type=java.lang.String.class) public void setPassword(String newPassword)
      Set the password for this connection.
      Parameters:
      newPassword - The new password.
    • 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 seconds 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 keystore containing the certificates required for an SSL connection", type=java.lang.String.class) public void setKeyRingClass(String newKeyRing)
      Set the key ring class name to use (applicable and mandatory for SSL protocol(s)).
      Parameters:
      newKeyRing - The key ring class name.
    • setKeyRingPassword

      @ConfigProperty(description="The password required to access the keystore for an SSL connection", type=java.lang.String.class) public void setKeyRingPassword(String newPassword)
      Set the key ring password to use (applicable and mandatory for SSL protocol).
      Parameters:
      newPassword - The key ring class 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:
    • 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