com.ibm.connector2.cics

Class EPIManagedConnectionFactory

  • All Implemented Interfaces:
    CICSLogTraceLevels, java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation, javax.resource.spi.ValidatingManagedConnectionFactory


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

      • 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 Detail

      • setSignonType

        @ConfigProperty(description="The sign-on capability for terminal install requests",
                        type=java.lang.Integer.class,
                        defaultValue="0")
        public void setSignonType(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.String strDevice)
        Set the device type that terminals created through this factory should use.
        Parameters:
        strDevice - The device type.
      • getDeviceType

        public java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.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 java.lang.Integer getInstallTimeout()
        Get the install timeout value in seconds.
        Returns:
        The install timeout in seconds.
      • createConnectionFactory

        public java.lang.Object createConnectionFactory()
                                                 throws javax.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 javax.resource.spi.ManagedConnectionFactory
        Throws:
        resourceException
        javax.resource.ResourceException
      • createConnectionFactory

        public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager manager)
                                                 throws javax.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 javax.resource.spi.ManagedConnectionFactory
        Parameters:
        manager - A suitable ConnectionManager to be associated with the EPIConnectionFactory.
        Throws:
        resourceException
        javax.resource.ResourceException
      • equals

        public boolean equals(java.lang.Object inObj)
        Returns true if all the configurable properties are equal.
        Specified by:
        equals in interface javax.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 javax.resource.spi.ManagedConnectionFactory
        Overrides:
        hashCode in class CICSManagedConnectionFactory
        Returns:
        A hashcode for this instance.
      • toString

        public java.lang.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(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). 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(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.
      • 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 that requests through this connection use",
                        type=java.lang.String.class)
        public void setPassword(java.lang.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(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 seconds to wait while connecting to a Gateway daemon",
                        type=java.lang.String.class)
        public void setSocketConnectTimeout(java.lang.String newTimeout)
                                     throws javax.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:
        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 keystore containing the certificates required for an SSL connection",
                        type=java.lang.String.class)
        public void setKeyRingClass(java.lang.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(java.lang.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(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
©Copyright IBM Corp. 1994, 2013
Legal