com.ibm.connector2.cics

Class 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.TransactionSupport
    An ECIManagedConnectionFactory is used to create physical 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.
    • Constructor Detail

      • ECIManagedConnectionFactory

        public ECIManagedConnectionFactory()
    • Method Detail

      • createConnectionFactory

        public java.lang.Object createConnectionFactory()
                                                 throws javax.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 javax.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:
        hashCode in interface javax.resource.spi.ManagedConnectionFactory
        Overrides:
        hashCode in class CICSManagedConnectionFactory
        Returns:
        A hashcode for this instance.
      • createConnectionFactory

        public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
                                                 throws javax.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 javax.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:
        equals in interface javax.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 java.lang.String toString()
        Returns a string representation of this object.
        Overrides:
        toString in class CICSManagedConnectionFactory
        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). 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 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.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
      • 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 value
        on
        will enabled XA transactions 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
©Copyright IBM Corp. 1994, 2013
Legal