Configure Engagement Services on JBoss Server

This section is applicable if you use JBoss as the J2EE Web container for the setup. Before you begin, you must configure the JBoss server with the configuration that provides Datasource services or continue with the default configuration provided out of the box.

After you configure the JBoss server, you must perform these operations:

Configure JBoss Server

You must configure the JBoss Server to provide the memory arguments and the location of the Kony Fabric Engagement Services configuration files.

To configure the JBoss server, follow these steps:

  1. Go to <JBoss Install Directory>/bin.
  2. Modify rub.bat file for Windows with the following parameters:
    Parameters (for JVM)RequiredDescription
    -Xmx2048m YesMinimum Heap size: 2GB
    -Xms2048m YesMaximum Heap size: 2GB
    -XX:MaxPermSize=512m Yes One-fourth of the main Heap memory assigned
    -XX:UseParallelGC Yes This is a recommended setting
    -Dkpns.configLocation Yes This is the directory where the configResource.properties, database.properties, and kpns-log4j.properties files must be placed.
    For example, if the location is /data/kpns-config, then you must specify the property as -Dkpns.configLocation=/data/kpns-config
    -Dhibernate.dialect Enables you to connect to the database. JDBC has to be configured on the AppServer level.Oracle= org.hibernate.dialect. Oracle10gDialect
  3. -Xms2048m –Xmx2048m -Dkpns.configLocation=/data/kpns-config

  4. Save the configuration.

Configure Datasource

Configure datasources for the following databases:

NOTE: From V8 SP4 FP1 HF1 onwards, DB2 support for Tomcat and JBoss Servers has been removed.

To configure the datasource, follow these steps:

MySQL

  1. Create a new module for MySQL driver.
    1. Create a folder hierarchy with path $JBOSS_HOME/modules

      $JBOSS_HOME/modules/com/mysql/main

    2. Copy mysql-connector-java-8.0.12.jar to $JBOSS_HOME/modules/com/mysql/main
    3. Create module.xml file.
    4. Add the following content.
      <module xmlns="urn:jboss:module:1.1" name="com.mysql">
         <properties>
            <property name="jboss.api" value="unsupported" />
         </properties>
         <resources>
            <resource-root path="mysql-connector-java-8.0.12.jar" />
         </resources>
         <dependencies>
            <module name="javax.api" />
            <module name="javax.transaction.api" />
            <module name="javax.servlet.api" optional="true" />
         </dependencies>
      </module>
  2. Configure data source in $JBOSS_HOME/standalone/configuration/standalone.xml
    1. Add the following configuration with in <datasources>


      <datasource jndi-name="java:/jdbc/kpnsdb" pool-name="kpnsds" enabled="true" use-java-context="true"> <connection-url> kpns db connection url </connection-url> <driver> mysql </driver> <security> <user-name> kpns db username </user-name> <password> kpns db password </password> </security> <new-connection-sql> SELECT 1 </new-connection-sql> <validation> <validate-on-match> true </validate-on-match> <check-valid-connection-sql> SELECT 1 </check-valid-connection-sql> </validation> </datasource>
    2. Add driver with in <drivers>

      <driver name="mysql" module="com.mysql"/>

  3. Disable default JPA in jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
    1. Remove the following tag:
      <subsystem xmlns="urn:jboss:domain:jpa:1.1">
        <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>
      </subsystem>

Microsoft SQL

  1. Create a new module for microsoft driver.
    1. Create a folder hierarchy with path $JBOSS_HOME/modules
    2. $JBOSS_HOME/modules/com/microsoft/main
    3. Copy  mssql-jdbc-7.0.0.jre8to $JBOSS_HOME/modules/com/microsoft/main
    4. Create module.xmlfile.
    5. Add the following content:
      <module xmlns="urn:jboss:module:1.1" name="com.microsoft">
        <properties>
          <property name="jboss.api" value="unsupported"/>
        </properties>
        <resources>
          <resource-root path="sqljdbc4-4.1.jar mssql-jdbc-7.0.0.jre8"/>
        </resources>
        <dependencies>
          <module name="javax.api"/>
          <module name="javax.transaction.api"/>
          <module name="javax.servlet.api" optional="true"/>
        </dependencies>
      </module>
  2. Configure data source in $JBOSS_HOME/standalone/configuration/standalone.xml.
    1. Add the following configuration with in <datasources>


      <datasource jndi-name="java:/jdbc/kpnsdb" pool-name="kpnsds" enabled="true" use-java-context="true"> <connection-url>kpns db connection url</connection-url> <driver>microsoft</driver> <security> <user-name>kpns db username</user-name> <password>kpns db password</password> </security> <new-connection-sql>SELECT 1</new-connection-sql> <validation> <validate-on-match>true</validate-on-match> <check-valid-connection-sql>SELECT 1</check-valid-connection-sql> </validation> </datasource>
    2. Add driver with in <drivers>

      <driver name="microsoft" module="com.microsoft"/>

  3. Disable default JPA in jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
    1. Remove the following tag:
      <subsystem xmlns="urn:jboss:domain:jpa:1.1">
         <jpa default-datasource="" default-extended-persistence-inheritance="DEEP" />
      </subsystem>

Oracle

  1. Create a new module for oracle driver.
    1. Create a folder hierarchy with path $JBOSS_HOME/modules.
    2. $JBOSS_HOME/modules/com/oracle/main
    3. Copy ojdbc6_g.jar to $JBOSS_HOME/modules/com/oracle/main
    4. Create module.xml file.
    5. Add the following content:
      <module xmlns="urn:jboss:module:1.1" name="com.oracle">
         <properties>
            <property name="jboss.api" value="unsupported" />
         </properties>
         <resources>
            <resource-root path="ojdbc6_g.jar" />
         </resources>
         <dependencies>
            <module name="javax.api" />
            <module name="javax.transaction.api" />
            <module name="javax.servlet.api" optional="true" />
         </dependencies>
      </module>
  2. Configure data source in $JBOSS_HOME/standalone/configuration/standalone.xml
    1. Add the following configuration with in <datasources>


      <datasource jndi-name="java:/jdbc/kpnsdb" pool-name="kpnsds" enabled="true" use-java-context="true"> <connection-url>kpns db connection url</connection-url> <driver>oracle</driver> <security> <user-name>kpns db username</user-name> <password>kpns db password</password> </security> <new-connection-sql>select 1 from dual</new-connection-sql> <validation> <validate-on-match>true</validate-on-match> <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql> </validation> </datasource>
    2. Add driver with in <drivers>

      <driver name="oracle" module="com.oracle"/>

  3. Disable default JPA in jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
  4. Remove the following tag:
    <subsystem xmlns="urn:jboss:domain:jpa:1.1">
       <jpa default-datasource="" default-extended-persistence-inheritance="DEEP" />
    </subsystem>

DB2

  1. Create a new module for db2 driver.
    1.   Create a folder hierarchy with path $JBOSS_HOME/modules
    2.  $JBOSS_HOME/modules/com/db2/main
    3.  Copy db2jcc4.jar to $JBOSS_HOME/modules/com/db2/main
    4. Create module.xml file.
    5. Add the following content:
      <module xmlns="urn:jboss:module:1.1" name="com.db2">
         <properties>
            <property name="jboss.api" value="unsupported" />
         </properties>
         <resources>
            <resource-root path="db2jcc4.jar" />
         </resources>
         <dependencies>
            <module name="javax.api" />
            <module name="javax.transaction.api" />
            <module name="javax.servlet.api" optional="true" />
         </dependencies>
      </module>
  2. Configure data source in $JBOSS_HOME/standalone/configuration/standalone.xml
    1. Add the following configuration with in <datasources>


      <datasource jndi-name="java:/jdbc/kpnsdb" pool-name="kpnsds" enabled="true" use-java-context="true"> <connection-url>kpns db connection url</connection-url> <driver>db2</driver> <security> <user-name>kpns db username</user-name> <password>kpns db password</password> </security> <new-connection-sql>select 1 from sysibm.sysdummy1</new-connection-sql> <validation> <validate-on-match>true</validate-on-match> <check-valid-connection-sql>select 1 from sysibm.sysdummy1</check-valid-connection-sql> </validation> </datasource>
    2. Add driver with in <drivers>

      <driver name="db2" module="com.db2"/>

    3. Disable default JPA in jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
    4. Remove the following tag:
      <subsystem xmlns="urn:jboss:domain:jpa:1.1">
         <jpa default-datasource="" default-extended-persistence-inheritance="DEEP" />
      </subsystem>

Deploy Kony Fabric Engagement Services

  1. To deploy Kony Fabric Engagement Services to JBoss Server, copy and paste the kpns.war file to the following location:
    <JBoss Install Directory>/standalone/deployments/
  2. After you deploy Kony Fabric Engagement Services, complete the Kony Fabric Engagement Services setup and start the JBoss server.