MF Sync JBoss Installation - Manual : Appendix: Install and Configure Using JBoss 5.1 > Setup JNDI for Sync Console Database

Install and Configure Kony MobileFabric Sync Using JBoss 5.1

This part provides instructions for installing and configuring Kony MobileFabric Sync Services using JBoss 5.1.

Setup JNDI for Sync Console Database

This section is applicable if you are using JBoss 5.1.

  1. Place driver jar file (for example: sqljdbc4.jar for SQL Server) in server > default > lib folder of JBoss.
  2. To configure JNDI for Sync Console Database, create syncconsole-ds.xml under server > default > deploy folder of JBoss with following configuration:
  3. <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
    <local-tx-datasource><jndi-name>ConsoleDB</jndi-name>
    <use-java-context>true</use-java-context>
    <connection-url>jdbc:sqlserver://localhost:1433;databaseName=syncconsole</connection-url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <user-name>sa</user-name>
    <password>kony123!</password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    </local-tx-datasource>
    </datasources>

Sync Home Setup

This section is applicable if you are using JBoss 5.1.

To set up Sync, follow these steps: 

  1. Configure sync.home directory, create a folder in your directory structure (for example: D:\Kony\KonySync)
  2. Create a directory with name conf under the created directory.
  3. Download PropertiesFile.zip and extract all property files under sync.home\conf.
    • console-log4j.properties
    • services-log4j.properties
    • synclicense.properties
    • syncconsole.properties
    • syncservice.properties
  4. Configure sync.home in run.bat.
  5. set JBOSS_HOME= D: \Kony\KonySync
    set JAVA_OPTS=%JAVA_OPTS% -Dsync.home="D: \Kony\KonySync" -Dmiddleware.home="D:\ Kony\KonySync" -Xms512m -Xmx1024m -XX:PermSize=256m
  6. Configure JNDI name and hibernate Dialect Class Name in syncconsole.properties file.
  7. Set syncconsole.jndi.name property to java:/ConsoleDB as mentioned in the code snippet below for JBoss: 
  8. #Sync Console configuration properties file
    #########################################################################
    #Hibernate Dialect related properties. #
    # #
    #For SQL Server #
    #hibernate.dialect=com.kony.sync.console.dialect.CustomSQLServerDialect #
    # #
    #For MySQL #
    #hibernate.dialect=com.kony.sync.console.dialect.CustomMySQLDialect #
    # #
    #For Oracle thin driver #
    #hibernate.dialect=com.kony.sync.console.dialect.CustomOracleDialect #
    #########################################################################
    hibernate.dialect=com.kony.sync.console.dialect.CustomSQLServerDialect
    #SyncConsole JNDI Name
    syncconsole.jndi.name=java:/ConsoleDB
  9. In syncservice.properties file, configure Sync Services Databases as mentioned below: 

  10. #Services configuration properties file 
    #This property can have sqlserver/oracle/mysql
    database.type=sqlserver
    ##############################################################################
    # DATABASE AND CONNECTION POOL RELATED PROPERTIES #
    # The following properties are only necessary if atleast one of the SyncScopes in the application has "Persistent" SyncStrategy
    #
    ##############################################################################
    #JBosspool or jndidatasource
    # if its mentioned as jndidatasource,the sync services looks for a JNDI URLs for each app jdbc/<appid>_UploadQueue and jdbc/<appid>_Replica
    jdbc.connectionProviderType=JBosspool
     
    #The below property is required when above property is set to jndidatasource.
    #For JBoss,
    #syncservices.jndi.prefix=java:comp/env/
    #For Weblogic and WebSphere, it must be empty
    #syncservices.jndi.prefix= 
    syncservices.jndi.prefix=java:comp/env/
    ##The below properties are necessary only when the above property is set to JBosspool 
    replicadatabase.host=localhost
    replicadatabase.port=1433
    # Instance name for SQLServer(blank in case of no instance), service name in case of Oracle
    replicadatabase.instance=sqlexpress
    replicadatabase.user=sa
    replicadatabase.password=kony123! 
    uploaddatabase.host=localhost
    uploaddatabase.port=1433
    # Instance name for SQLServer(blank in case of no instance), service name in case of Oracle
    uploaddatabase.instance=sqlexpress
    uploaddatabase.user=sa
    uploaddatabase.password=kony123! 
    ##############################################################################
    #These properties are common to both ReplicaDB and UploadQueueDB
    #Database connection related properties.
    #For SQL Server on JBoss
    #database.driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
    #database.jdbcurl.prefix=jdbc:sqlserver
    #For SQL Server on Weblogic
    #database.driverName=weblogic.jdbc.sqlserver.SQLServerDriver
    #database.jdbcurl.prefix=jdbc:weblogic:sqlserver
    #For MySQL
    #database.driverName=com.mysql.jdbc.Driver
    #database.jdbcurl.prefix=jdbc:mysql
    #For Oracle thin driver
    #database.driverName=oracle.jdbc.driver.OracleDriver
    #database.jdbcurl.prefix=jdbc:oracle:thin
    ############################################################################## 
    database.driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
    database.jdbcurl.prefix=jdbc:sqlserver 
    #JBoss Connection Pool standard properties
    cp.jmxEnabled=true
    cp.testWhileIdle=false
    cp.testOnBorrow=true
    cp.testOnReturn=false
    cp.validationInterval=30000
    cp.timeBetweenEvictionRunsMillis=50000
    cp.maxActive=100
    cp.initialSize=10
    cp.maxWait=10000
    cp.removeAbandonedTimeout=60
    cp.minEvictableIdleTimeMillis=30000
    cp.minIdle=10
    cp.logAbandoned=true
    cp.removeAbandoned=true
    cp.numTestsPerEvictionRun=3 
    #Property to enable or disable connection pooling in services for all DB connections.
    sync.enable.connectionpool=true
  11. Configure log4j properties in console-log4j.properties and services-log4j.properties. Set logs directory to existing directory in system directory structure.

    log4j.rootLogger=ERROR,stdout,FA
    log4j.logger.com.kony=ERROR
    log4j.logger.com.konylabs=ERROR
    log4j.logger.org.springframework=off
    log4j.logger.org.hibernate=off
    log4j.logger.org.hibernate.jdbc.ConnectionManager=off
    log4j.logger.org.hibernate.type=off
    log4j.logger.org.hibernate.hql.ast.QueryTranslatorImpl=off
    log4j.logger.org.quartz=off 
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%n[syncconsole][%p][%d{dd MMM yyyy HH:mm:ss,SSS}]:[%c:%M:%L]: %m
    log4j.appender.FA= org.apache.log4j.RollingFileAppender
    log4j.appender.FA.maxFileSize=10240KB
    log4j.appender.FA.maxBackupIndex=50
    log4j.appender.FA.File=D:/Kony/KonySync/synclogs/syncconsole.log
    log4j.appender.FA.layout=org.apache.log4j.PatternLayout
    log4j.appender.FA.layout.ConversionPattern=%n[syncconsole][%p][%d{dd MMM yyyy HH:mm:ss,SSS}]:[%c:%M:%L]: %m

Deploy SyncConsole

This section is applicable if you are using JBoss 5.1.

To Deploy Sync Console, follow these steps:

  1. Download syncconsole.war file and place it into server > default > deploy folder of JBoss.
  2. Start JBoss Server from JBoss Installation folder.
  3. Double-click run.bat for windows in <JBoss_Installation>\bin folder.

  4. Access the console application from browser using the URL http://localhost:8080/syncconsole.
  5. After successful deployment, the following page appears.
  6. Enter super user credentials for the first time to logon:

    • Username: syncadmin

    • Password: SyncAdmin123

  7. After successful login, the following home screen appears :

Deploy SyncServices

This section is applicable if you are using JBoss 5.1.

To Deploy Sync Services, follow these steps:

  1. Download SyncService.war file and place in server > default > deploy folder.
  2. Start JBoss server from JBoss Installation folder.
  3. Double-click run.bat for windows in <JBoss_Installation>\bin folder.
  4. Access the service application from browser using the URL http://localhost:8080/syncservice.
  5. After successful deployment, the following page appears: 

 

Copyright © 2014 Kony, Inc. All rights reserved.