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:
- Go to
<JBoss Install Directory>/bin.
Modify rub.bat
file for Windows with the following parameters:Parameters (for JVM) Required Description -Xmx2048m Yes Minimum Heap size: 2GB -Xms2048m Yes Maximum 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
, andkpns-log4j.propertie
s 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
-
-Xms2048m –Xmx2048m -Dkpns.configLocation=/data/kpns-config
- 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
- Create a new module for MySQL driver.
- Create a folder hierarchy with path
$JBOSS_HOME/modules
$JBOSS_HOME/modules/com/mysql/main
- Copy
mysql-connector-java-8.0.12.jar
to$JBOSS_HOME/modules/com/mysql/main
- Create
module.xml
file. - 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>
- Create a folder hierarchy with path
- Configure data source in
$JBOSS_HOME/standalone/configuration/standalone.xml
- 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> - Add driver with in <drivers>
<driver name="mysql" module="com.mysql"/>
- Add the following configuration with in <datasources>
- Disable default JPA in
jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
- Remove the following tag:
<subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/> </subsystem>
- Remove the following tag:
Microsoft SQL
- Create a new module for microsoft driver.
- Create a folder hierarchy with path
$JBOSS_HOME/modules
$JBOSS_HOME/modules/com/microsoft/main
- Copy
mssql-jdbc-7.0.0.jre8
$JBOSS_HOME/modules/com/microsoft/main
- Create
module.xml
file. - 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>
- Create a folder hierarchy with path
- Configure data source in
$JBOSS_HOME/standalone/configuration/standalone.xml.
- 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> - Add driver with in <drivers>
<driver name="microsoft" module="com.microsoft"/>
- Add the following configuration with in <datasources>
- Disable default JPA in
jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
- Remove the following tag:
<subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence-inheritance="DEEP" /> </subsystem>
- Remove the following tag:
Oracle
- Create a new module for oracle driver.
- Create a folder hierarchy with path
$JBOSS_HOME/modules.
$JBOSS_HOME/modules/com/oracle/main
- Copy
ojdbc6_g.jar
to$JBOSS_HOME/modules/com/oracle/main
- Create
module.xml
file. - 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>
- Create a folder hierarchy with path
- Configure data source in
$JBOSS_HOME/standalone/configuration/standalone.xml
- 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> - Add driver with in <drivers>
<driver name="oracle" module="com.oracle"/>
- Add the following configuration with in <datasources>
- Disable default JPA in
jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xml
- Remove the following tag:
<subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence-inheritance="DEEP" /> </subsystem>
DB2
- Create a new module for db2 driver.
- Create a folder hierarchy with path
$JBOSS_HOME/modules
$JBOSS_HOME/modules/com/db2/main
- Copy
db2jcc4.jar
to$JBOSS_HOME/modules/com/db2/main
- Create
module.xml
file. - 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>
- Create a folder hierarchy with path
- Configure data source in
$JBOSS_HOME/standalone/configuration/standalone.xml
- 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> - Add driver with in <drivers>
<driver name="db2" module="com.db2"/>
- Disable default JPA in
jboss 6.2 $JBOSS_HOME/standalone/configuration/standalone.xm
l - Remove the following tag:
<subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence-inheritance="DEEP" /> </subsystem>
- Add the following configuration with in <datasources>
Deploy Kony Fabric Engagement Services
- 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/
- After you deploy Kony Fabric Engagement Services, complete the Kony Fabric Engagement Services setup and start the JBoss server.