Configuring TIBCO MDM for JBoss WildFly Application Server

Some element tags in the standalone.xml file differ in the JBoss WildFly 10.1.0 version and JBoss 7.1 and JBoss EAP 7.0 versions. For example, <subsystem xmlns="urn:jboss:domain:transactions:1.4"> is changed to <subsystem xmlns="urn:jboss:domain:transactions:3.0">.

Note: Ensure the correct tagging during configuration.

Procedure

Perform the following actions in the standalone.xml file if you are using JBoss WildFly Application Server:

  1. Enable access to remote server
    1. Open the standalone.xml file located in the $JBOSS_HOME/standalone/configuration directory.
    2. Change the value of an interface attribute from management to public in the following property:
      <socket-binding name="management-http" interface="public" port="${jboss.management.http.port:9990}"/>
  2. Specify system properties
    1. Add <system-properties> element after the <extensions> element.
    2. Under <system-properties> element, type the system property name for the name attribute and its value for the value attribute.
      <system-properties>
      <property name="MQ_HOME" value="C:/Apps/tibco/mdm/version"/>
      <property name="MQ_CONFIG_FILE" value="C:/Apps/tibco/mdm/version/config/ConfigValues.xml"/>
      <property name="MQ_COMMON_DIR" value="C:/Apps/tibco/mdm/version/common"/>
      <property name="MQ_LOG" value="C:/Apps/tibco/mdm/version/log"/>
      <property name="NODE_ID" value="Member1"/>
      <property name="PATH" value="C:/Apps/tibco/mdm/version/bin/as/2.1/bin;C:/Apps/tibco/
mdm/version/bin/as/2.1/lib;${PATH}"/>
      Note: The PATH system property is applicable only for Windows environment.
      <property name="LD_LIBRARY_PATH" value=" /Apps/tibco/mdm/version/bin/as/2.1/bin:/Apps/tibco/mdm/version/bin/
as/2.1/lib:${ LD_LIBRARY_PATH}"/>
      Note: The LD_LIBRARY_PATH system property is applicable only for non-Windows environment.
      <property name="ORACLE_HOME" value="C:/Apps/Oracle/product/11.2.0/dbhome_1"/>
      <property name="log4j.ignoreTCL" value="true"/>
      <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>
      <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
      <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
      </system-properties>
      Note: The path separator must contain forward slash instead of a backward slash. For example, for MQ_COMMON_DIR - C:/Apps/tibco/mdm/version/common.

      The following table describes property names and their description:

      Environment Variables for JBoss WildFly Application Server
      Property Name Description
      MQ_HOME Refers to $MQ_HOME of TIBCO MDM.
      MQ_CONFIG_FILE Refers to configuration directory location of TIBCO MDM.
      MQ_COMMON_DIR Refers to common directory location of TIBCO MDM.
      MQ_LOG Refers to the log folder location specified in $MQ_HOME.
      NODE_ID Refers to the node ID.
      PATH Refers to the path to include ActiveSpaces libraries for Windows environment.
      LD_LIBRARY_PATH Refers to the path to include ActiveSpaces libraries for non-Windows environment.
      ORACLE_HOME Refers to the path where Oracle database is installed.
      log4j.ignoreTCL To configure the logging, specify True value for this property. After you configure this property, all logs are displayed in the respective log file.
      org.apache.tomcat.util.http.Parameters.MAX_COUNT By default, JBoss WildFly 10.1.0 version application server set the 512 value for HTTP parameters. To override this value and allow maximum HTTP parameters, set the maximum value. For example, 5000 .
      org.apache.catalina.connector.URI_ENCODING Refers to the UTF-8 encoding. This needs to be specified to support multiple languages.
      org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING Specify true. The valid values are true or false.
  3. Specify max-post-size and max-parameters:
    Parameter Name Description Example
    max-post-size For uploading a file either through a web service or the TIBCO MDM UI, the maximum file size limit is 10 MB. If you want to upload a file greater than 10MB, add the max-post-size parameter and change the file size. You also need to change the value of the Upload File Size Limit property in Configurator.

    For information on uploading a file through the TIBCO MDM UI, refer to the section, "Creating Records" in TIBCO MDM User's Guide.

    <server name="default-server">
    <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" max-post-size="974247881"/>
    <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
    <host name="default-host" alias="localhost">
    <location name="/" handler="welcome-content"/>
    <filter-ref name="server-header"/>
    <filter-ref name="x-powered-by-header"/>
    </host>
    </server>
    max-parameters The maximum number of parameters that can be added to the TIBCO MDM URL into the browser. Using this value, you can avoid the hash exposure used in the URL. This applies to both query and POST data parameters.

    By default, the size of the max-parameters is 1000. You can change the value as per your requirement.

    <server name="default-server">
    <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" max-post-size="974247881" max-parameters="5000"/>
    <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
    <host name="default-host" alias="localhost">
    <location name="/" handler="welcome-content"/>
    <filter-ref name="server-header"/>
    <filter-ref name="x-powered-by-header"/>
    </host>
    </server>
  4. Create data sources
    1. Under <datasources> element, add <DataSource> element with attributes such as:
    • jndi-name="java:jboss/eCMDataSource"
    • pool-name="MDMDataSource"
    1. Enable data source
    • Specify true for the enabled attribute
    1. Under <drivers> element add JDBC driver specific to each database.
    • For Oracle database:
      <driver>oracle.ojdbc.driver.OracleDriver</driver>
    • For SQL Server database:
      <driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
    • For PostgreSQL database:
      <driver>postgresql-9.1-901.jdbc4.jar</driver>
    1. Specify connection settings:
    • Connection URL-Type any one of the following URLs:

      For Oracle database: jdbc:oracle:thin:@localhost:1521:dbinstance_name

      For SQL Server database: jdbc:sqlserver://localhost:1433;databaseName=value

      For PostgreSQL database: jdbc:postgresql://localhost:5432/dbinstance_name

    • User Name and Password

      Specify credentials for the Username and Password attributes.

    1. Configure Transaction Isolation
    • Specify the TRANSACTION_READ_COMMITTED value for <transaction-isolation> attribute.
    1. Specify pool size

      By default, 0 pool size is displayed.

    • Specify 10 for Min Pool Size: <min-pool-size>10</min-pool-size>
    • Specify 150 for Max Pool Size: <max-pool-size>150</max-pool-size>
    1. Specify transaction timeout
    • Specify the transaction timeout in the <blocking-timeout-millis> element. This element indicates the maximum time in milliseconds to block a transaction while waiting for a connection and before displaying an exception. This blocks only while waiting for a permit for a connection, and does not display an exception if creating a new connection that takes an inordinately long time. The default is 36000 milliseconds.
    For sample data sources, refer to Sample Data Sources.
  5. Change deployment timeout

    By default, the deployment timeout is displayed as 60 seconds. For slower machines, TIBCO recommends to increase the deployment timeout:

    1. Under <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">element, add the deployment-timeout attribute and its value. For example,
       <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}" deployment-timeout="5000"/>
  6. Specify default timeout

    To deploy huge metadata from TIBCO MDM Studio to TIBCO MDM, you need to add the default timeout attribute under transaction element.

    1. Under <subsystem xmlns="urn:jboss:domain:transactions:3.0"> element, add the following tag:
      <coordinator-environment default-timeout="1800000"/>
  7. Change HTTP Port

    This step is optional. By default, the HTTP port is 8080. If required, you can change it.

    1. Under the <socket-binding-group> element, change the value of the port attribute for http port.
    Note: Alternatively, you can also change the HTTP port using the following parameter: standalone.bat -Djboss.socket.binding.port-offset=new _port_number. For example, if the current HTTP port is 8080 and you want to change it to 8180, type standalone.bat -Djboss.socket.binding.port-offset=100;in the command prompt and press Enter. The HTTP port number is changed to 8180.
  8. Configuration for EJB
    • Passing Values by Reference

      While invoking the remote method of EJB, JBoss WildFly Application Server WildFly 10.1.0 passes default values using the Passed By Value method instead of the Pass By Reference method. Therefore, to disable the Passed By Value method, add the following property in the standalone.xml file.

    1. Navigate to <subsystem xmlns="urn:jboss:domain:ejb3:4.0"> section, and add the following line at the end of the section: 
<in-vm-remote-interface-invocation pass-by-value="false"/>
    • Define New Pool and Increase EJB Pool Size

      When multiple users execute concurrent requests, multiple instances of each bean are used concurrently. Each bean has a limited number of instances in the bean-instance pool, available for use. If all the beans are in use, subsequent requests have to wait for a bean to be released by the previous thread, and then release back into the pool. This wait is for a specific time, that is, five minutes in TIBCO MDM. If the bean is not released within five minutes, an Instance-Acquisition-TimeOut error is displayed and the request remains incomplete.

      To avoid such errors, increase the EJB pool size to a large number (500 or 1000). On the JBoss WildFly Application Server, the default pool size is 20, defined in the standalone.xml file. Changing the default pool size may affect all beans in all deployed applications. Therefore, you need to define a new pool.

    1. Navigate to the <subsystem xmlns="urn:jboss:domain:ejb3:4.0"> section, and define the following new pool and specify its pool size:
       
<pools>
      <bean-instance-pools>
      <strict-max-pool name="mdm-pool" max-pool-size="500" instance-acquisition-timeout="5"         instance-acquisition-timeout-unit="MINUTES"/> 
      </bean-instance-pools>
      </pools>
      				
  9. Defining TIBCO module

    In some cases, additional external modules need to be created to configure out-of-the-box functionality.

    1. Navigate to the $JBOSS_HOME/modules/system/layers/base/com folder and create the following hierarchical folders: tibco/mdm/main
    2. Create a module.xml file in the $JBOSS_HOME/modules/system/layers/base/com/tibco/mdm/main folder and add the following snippets:
      <module xmlns="urn:jboss:module:1.3" name="com.tibco.mdm">
          <resources>
              <resource-root path="tibcrypt.jar"/>
              <resource-root path="tibjms.jar"/>
              <!-- Insert resources here -->
          </resources>
      <dependencies>
              <!-- Insert dependencies here -->
              <module name="javax.api"/>
              <module name="javax.jms.api"/>
          </dependencies>
      </module>
    3. Save the module.xml file.
  10. Adding TIBCO Module to Global Modules List
    Note: Adding TIBCO module to the Global modules list is must.
    1. Open the standalone.xml file located at $JBOSS_HOME/standalone/configuration directory.
    2. Modify the existing <subsystem xmlns="urn:jboss:domain:ee:4.0"/> section per database as follows:
    • For Oracle and PostgreSQL databases:
              <subsystem xmlns="urn:jboss:domain:ee:4.0">
                 <global-modules>
                   <module name="com.tibco.mdm" slot="main"/>
                 </global-modules>
              </subsystem>
    • For Microsoft SQL Server database, you also need to add the Microsoft SQL driver module to the global Modules list. For example,
              <subsystem xmlns="urn:jboss:domain:ee:4.0">
                 <global-modules>
                   <module name="com.tibco.mdm" slot="main"/>
                   <module name="com.microsoft.sqlserver" slot="main"/>
                 </global-modules>
              </subsystem>
  11. Specifying EMS configuration
    1. Copy the tibjms.jar and tibcrypt.jar files from $EMS_HOME/lib and place them in the following folders:
      $JBOSS_HOME/modules/system/layers/base/com/tibco/mdm/main $MQ_HOME/lib/external
    2. Rename the jboss-jms-api_2.0_spec-1.0.0.Final.jar file to jboss-jms-api_2.0_spec-1.0.0.Final.jar.org located in the $JBOSS_HOME/modules/system/layers/base/javax/jms/api/main folder.
    3. Copy the jms-2.0.jar file from $EMS_HOME/lib to the $JBOSS_HOME/modules/system/layers/base/javax/jms/api/main folder.
    4. Open the module.xml file from the $JBOSS_HOME/modules/system/layers/base/javax/jms/api/main folder.
    5. Replace the path value from jboss-jms-api_2.0_spec-1.0.0.Final.jar to jms-2.0.jar.
    6. Restart the JBoss WildFly application server.
  12. Specifying HTTP session timeout

    The JBoss WildFly application server provides the default HTTP session timeout of 30 minutes. However, the JBoss Application Server does not support modification of the default value.

    As per your business requirement, if you want to override the default HTTP session timeout value for TIBCO MDM, add the following entry in the application web.xml file or the jboss-web.xml file:

    <web-app>
      <session-config>
       <!-- HTTP Session timeout, in minutes -->
       <session-timeout>40</session-timeout>
      </session-config>
    </web-app>

    Both the files are available in the ECM.ear > EML.war > WEB-INF directory.