Configuring TIBCO MDM for JBoss WildFly Application Server
Some element tags in the standalone.xml file differ in the JBoss WildFly 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">.
Procedure
Perform the following actions in the standalone.xml file if you are using JBoss WildFly Application Server:
- Enable access to remote server
-
Specify system properties
- Add <system-properties> element after the <extensions> element.
-
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}"/>
<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}"/>
<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 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.
-
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>
-
Add the following VM parameters in
standalone.conf (Linux) or
standalone.conf.bat (Windows):
--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --illegal-access=permit --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
For example, in standalone.conf.bat (Windows) set parameters as shown in the following sample:"JAVA_OPTS=%JAVA_OPTS% --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED" "JAVA_OPTS=%JAVA_OPTS% --add-exports=java.base/sun.nio.ch=ALL-UNNAMED" "JAVA_OPTS=%JAVA_OPTS% --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED" "JAVA_OPTS=%JAVA_OPTS% --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED" "JAVA_OPTS=%JAVA_OPTS% --add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED" "JAVA_OPTS=%JAVA_OPTS% --illegal-access=permit" "JAVA_OPTS=%JAVA_OPTS% --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED"
-
Create data sources
- For Oracle database:
<driver>oracle.ojdbc.driver.OracleDriver</driver>
- For SQL Server database:
<driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver>
- For PostgreSQL database:
<driver module="org.postgresql.jdbc.driver" name="PostgresqlDriver"> <driver-class>org.postgresql.Driver</driver-class> </driver>
- 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.
- 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>
- 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. - For Oracle database:
-
Change deployment timeout
By default, the deployment timeout is displayed as 60 seconds. For slower machines, TIBCO recommends to increase the deployment timeout:
-
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"/>
-
Under
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">element, add the deployment-timeout attribute and its value. For example,
-
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.
-
Change HTTP Port
This step is optional. By default, the HTTP port is 8080. If required, you can change it.
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. -
Configuration for EJB
- Passing Values by Reference
While invoking the remote method of EJB, JBoss WildFly Application Server WildFly 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.
- 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.
-
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>
- Passing Values by Reference
-
Defining TIBCO module
In some cases, additional external modules need to be created to configure out-of-the-box functionality.
- Navigate to the $JBOSS_HOME/modules/system/layers/base/com folder and create the following hierarchical folders: tibco/mdm/main
-
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>
- Save the module.xml file.
-
Adding TIBCO Module to Global Modules List
- Open the standalone.xml file located at $JBOSS_HOME/standalone/configuration directory.
- 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>
-
Specifying EMS configuration
-
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
- 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.
- Copy the jms-2.0.jar file from $EMS_HOME/lib to the $JBOSS_HOME/modules/system/layers/base/javax/jms/api/main folder.
- Open the module.xml file from the $JBOSS_HOME/modules/system/layers/base/javax/jms/api/main folder.
- Replace the path value from jboss-jms-api_2.0_spec-1.0.0.Final.jar to jms-2.0.jar.
- Restart the JBoss WildFly application server.
-
Copy the
tibjms.jar and
tibcrypt.jar files from
$EMS_HOME/lib and place them in the following folders:
-
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.