Configuring TIBCO MDM for JBoss Application Server
Some element tags in the standalone.xml file differ in the JBoss 7.1 version and JBoss EAP 6.2 version. For example, <subsystem xmlns="urn:jboss:domain:transactions:1.1"> is changed to <subsystem xmlns="urn:jboss:domain:transactions:1.4">.
Procedure
- Enabling access to remote server
-
Specify system properties
- Open the standalone.xml file located in the $JBOSS_HOME/standalone/configuration directory.
- 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/9.0"/> <property name="MQ_CONFIG_FILE" value="C:/Apps/tibco/mdm/9.0/config/ConfigValues.xml"/> <property name="MQ_COMMON_DIR" value="C:/Apps/tibco/mdm/9.0/common"/> <property name="MQ_LOG" value="C:/Apps/tibco/mdm/9.0/log"/> <property name="NODE_ID" value="Member1"/> <property name="PATH" value="C:/Apps/tibco/mdm/9.0/bin/as/2.1/bin;C:/Apps/tibco/ mdm/9.0/bin/as/2.1/lib;${PATH}"/>
<property name="LD_LIBRARY_PATH" value=" /Apps/tibco/mdm/9.0/bin/as/2.1/bin:/Apps/tibco/mdm/9.0/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/9.0/common.The following table describes property names and their description:
Environment Variables for JBoss 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 7.1 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. - Save the updated standalone.xml file.
-
Create data sources
- Open the standalone.xml file located in the $JBOSS_HOME/standalone/configuration directory.
- Under <datasources> element, add <DataSource> element with attributes such as:
- 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>
- 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.
-
Save the updated
standalone.xml file.
For sample data sources, refer to Sample Data Sources.
-
Change deployment timeout
By default, the deployment timeout is displayed as 60 seconds. For slower machines, TIBCO recommends to increase the deployment timeout:
- Open the standalone.xml file located at $JBOSS_HOME/standalone/configuration directory.
-
Under <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1"> element, add the deployment-timeout attribute and its value. For example,
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="5000"/> </subsystem>
- Save the updated standalone.xml file.
-
Specify default timeout
To deploy huge metadata from TIBCO MDM Studio to TIBCO MDM, you need to add the defalut timeout attribute under transacation element.
-
Change HTTP Port
This step is optional. By default, the HTTP port is 8080. If required, you can change it.
- Open the standalone.xml file located at $JBOSS_HOME/standalone/configuration directory.
- Under the <socket-binding-group> element, change the value of the port attribute for http port.
- Save the updated standalone.xml file.
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 Application Server 7.1 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.
- Open the standalone.xml file located at $JBOSS_HOME\standalone\configuration\.
- Go to <subsystem xmlns="urn:jboss:domain:ejb3:1.2"> section, and add the following line at the end of the section: <in-vm-remote-interface-invocation pass-by-value="false"/>
- Save the updated standalone.xml file.
- 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 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.
- Open the standalone.xml file located at $JBOSS_HOME\standalone\configuration\.
-
Navigate to the <subsystem xmlns="urn:jboss:domain:ejb3:1.2"> 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>
- Save the updated standalone.xml file.
- Passing Values by Reference
-
Defining TIBCO module
In some cases, additional external modules need to be created to configure the out-of-the-box functionality.
- Navigate to the $JBOSS_HOME/modules folder and create the following hierarchical folders:
- com/tibco/mdm/main
-
Create a
module.xml file in the
$JBOSS_HOME/modules/com/tibco/mdm/main folder and add the following snippets:
<module xmlns="urn:jboss:module:1.0" 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:1.0"/> section per database as follows:
- For Oracle and PostgreSQL databases:
<subsystem xmlns="urn:jboss:domain:ee:1.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:1.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/com/tibco/mdm/main
$MQ_HOME/lib/external
- Rename the jboss-jms-api_1.1_spec-1.0.0.Final.jar file to jboss-jms-api_1.1_spec-1.0.0.Final.jar.org located in the $JBOSS_HOME/modules/javax/jms/api/main folder.
- Copy the jms-2.0.jar file from $EMS_HOME/lib and to the $JBOSS_HOME/modules/javax/jms/api/main folder.
- Open the module.xml file from the $JBOSS_HOME/modules/javax/jms/api/main folder.
- Replace jboss-jms-api_1.1_spec-1.0.0.Final.jar with jms-2.0.jar.
- Restart the JBoss 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 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.