Manual Installation of the Enterprise Extensions

If you are installing on a platform that supports the GUI installer (Windows, Linux, Unix), it is recommended that you use that. If not, but you are on a platform that supports the silent form of the installer (again Windows, Linux, Unix), it is recommended that you use that. Otherwise, or if you have other requirements, use the manual installation.

The installation work required is dependent on your target environment. Follow the guidelines for manual installation for your target platform that are documented for the Community Edition. These instructions will supplement those.

However you plan to install KonaKart Enterprise Extensions, it is still advisable to run through the GUI installer if you can. The reason for this is that it will populate all the properties files for you and load your database automatically. Once you have done this you can make WARs from the GUI-installed version of KonaKart (details below) and deploy them elsewhere as you please.

The KonaKart Enterprise Extensions Installation section contains general KonaKart Enterprise Extensions installation instructions (although focuses on using the GUI-driven and silent versions of the installer) and contains important information that is also relevant for the manual installation so check this before starting out.

In general, you need to follow all the documented installation instructions except for the "Install Enterprise Extensions" section which explains how to use the automated GUI and Silent versions of the installation.

Perform all the documented installation instructions for:

For the purposes of this guide we'll use MySQL and a database named "store1" (and "store2" where applicable).

  1. Copy the Enterprise Extensions files into position

    Unzip the KonaKart-Enterprise-n.n.n.n.zip file for your version on top of the existing KonaKart Community edition installation. Ensure that you unzip to the home directory of the existing KonaKart installation so that all the files are loaded into the correct positions.

  2. Modify the KonaKart Configuration Files

    1. Set Database Parameters

      Modifications should only be required if you have chosen Multi-Store Multiple Database Mode (Engine Mode 1). For all other modes, the database parameters should already be set correctly.

      Set DB name (and other database connection parameters) in konakart.properties and konakartadmin.properties Change the string "dbname" in the URL for MySQL to the name of your database (in this case "konakart") in the following files:

      {konakart}/webapps/konakart/WEB-INF/classes/konakart.properties

      {konakart}/webapps/konakartadmin/WEB-INF/classes/konakartadmin.properties

      This is documented in the "Defining the Database Parameters" section of the Community Edition installation.

      For Multi-Store Single DB Modes (Engine Mode 2) there is no difference to the database definition required in the two properties files. However, if you are using the Multi-Store Multiple DBs Mode (Engine Mode 1) you will need to enter database connection credentials for each of your stores. An example of a two-store set-up is:

      
      # -----------------------------------------------------------------------------------
      #  D A T A B A S E  P R O P E R T I E S
      # -----------------------------------------------------------------------------------
      
      torque.applicationRoot = .
      
      torque.database.default                         = store1
      
      torque.database.store1.adapter              = mysql
      torque.dsfactory.store1.connection.driver   = com.mysql.jdbc.Driver
      torque.dsfactory.store1.connection.url      = 
         jdbc:mysql://localhost:3306/store1?zeroDateTimeBehavior=convertToNull&useSSL=false
      torque.dsfactory.store1.connection.user     = root
      torque.dsfactory.store1.connection.password = 
      
      # Enterprise Feature
      torque.database.store2.adapter              = mysql
      torque.dsfactory.store2.connection.driver   = com.mysql.jdbc.Driver
      torque.dsfactory.store2.connection.url      = 
         jdbc:mysql://localhost:3306/store2?zeroDateTimeBehavior=convertToNull&useSSL=false
      torque.dsfactory.store2.connection.user     = root
      torque.dsfactory.store2.connection.password = 
      
      # -----------------------------------------------------------------------------------
      #  C O N N E C T I O N   P O O L   P R O P E R T I E S
      # -----------------------------------------------------------------------------------
      # We can leave the defaults
      # -----------------------------------------------------------------------------------
      
      # Using commons-dbcp 
      
      torque.dsfactory.store1.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
      torque.dsfactory.store2.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
      
      # The maximum number of active connections that can be allocated from this pool at 
      # the same time, or zero for no limit.
      
      torque.dsfactory.store1.pool.maxActive=0
      torque.dsfactory.store2.pool.maxActive=0
      
      # The maximum number of active connections that can remain idle in the pool, without 
      # extra ones being released, or zero for no limit. 
      
      torque.dsfactory.store1.pool.maxIdle=10
      torque.dsfactory.store2.pool.maxIdle=10
      
      # The maximum number of milliseconds that the pool will wait (when there are no 
      # available connections) for a connection to be returned before throwing an exception,
      # or -1 to wait indefinitely. 
      
      torque.dsfactory.store1.pool.maxWait=-1
      torque.dsfactory.store2.pool.maxWait=-1
      
      # The indication of whether objects will be validated before being borrowed from the
      # pool. If the object fails to validate, it will be dropped from the pool, and we will
      # attempt to borrow another. 
      
      torque.dsfactory.store1.pool.testOnBorrow=true
      torque.dsfactory.store2.pool.testOnBorrow=true
      
      # The SQL query that will be used to validate connections from this pool before 
      # returning them to the caller. If specified, this query MUST be an SQL SELECT 
      # statement that returns at least one row. 
      # Recommended settings:
      # for MySQL/PostgreSQL/MS SQL use: SELECT 1
      # for Oracle                  use: SELECT 1 from dual
      # for DB2                     use: SELECT 1 FROM sysibm.sysdummy1
      
      torque.dsfactory.store1.pool.validationQuery=SELECT 1
      torque.dsfactory.store2.pool.validationQuery=SELECT 1    
      
      

      Notice how most of the Torque parameters are repeated for each store.

      Configure the "EE" variants of the managers in konakart.properties as required:

      
      konakart.manager.ContentMgr = com.konakart.bl.ContentMgrEE
      konakart.manager.CustomerMgr = com.konakart.bl.CustomerMgrEE
      konakart.manager.CustomerTagMgr = com.konakart.bl.CustomerTagMgrEE
      konakart.manager.ExportMgr = com.konakart.bl.ExportMgrEE
      konakart.manager.OrderMgr = com.konakart.bl.OrderMgrEE
      konakart.manager.ProductMgr = com.konakart.bl.ProductMgrEE
      konakart.manager.PromotionMgr = com.konakart.bl.PromotionMgrEE
      konakart.manager.ReviewMgr = com.konakart.bl.ReviewMgrEE
      konakart.manager.SecurityMgr = com.konakart.bl.SecurityMgrEE 
      konakart.manager.SuggestionMgr = com.konakart.bl.SuggestionMgrEE
      
      

    2. konakartadmin.properties

      The changes required are dependent on the chosen Engine Mode.

      For Multi-Store Multiple Databases Mode (Engine Mode 1) you need to define the databases that are used for each store. These parameters can be ignored for other Engine Modes. This is an example of a two database setup with databases store1 and store2:

      
      # -----------------------------------------------------------------------------------
      # Enterprise Feature
      # The databases actually used in a multi store / multi database environment
      # The "used" database definitions must map to the Torque definitions above
      # The "description.*" definitions are friendly names for the Stores
      
      konakart.databases.used = store1 store2
      konakart.databases.description.store1 = Store1
      konakart.databases.description.store2 = Store2
      
      

      For Multi-Store Single Database Mode (Engine Mode 2) you need to define whether or not you are operating in the Shared Customers Mode. This setting is not used for other engine modes. This is an example of a definition for defining that you wish to use Shared Customers:

      
      # -----------------------------------------------------------------------------------
      # Enterprise Feature
      # When in multi-store single database mode, the customers can be shared between stores
      
      konakart.customersShared = true
      
      

      For Multi-Store Single Database Mode (Engine Mode 2) you also need to define whether or not you are operating in the Shared Products Mode. This setting is not used for other engine modes. This is an example of a definition for defining that you wish to use Shared Products:

      
      # -----------------------------------------------------------------------------------
      # Enterprise Feature
      # When in multi-store single database mode, the products can be shared between stores
      
      konakart.productsShared = true
      
      

      For Multi-Store Single Database Mode (Engine Mode 2) you also need to define whether or not you are operating in the Shared Categories Mode. This setting is not used for other engine modes. This is an example of a definition for defining that you wish to use Shared Categories:

      
      # -----------------------------------------------------------------------------------
      # Enterprise Feature
      # When in multi-store single database mode, the categories can be shared between stores
      
      konakart.categoriesShared = true
      
      

      Set the "EE" variants of the managers in konakartadmin.properties as required:

      
      konakart.admin_manager.AdminContentMgr = com.konakartadmin.bl.AdminContentMgrEE
      konakart.admin_manager.AdminCustomerMgr = com.konakartadmin.bl.AdminCustomerMgrEE
      konakart.admin_manager.AdminCustomerTagMgr = com.konakartadmin.bl.AdminCustomerTagMgrEE
      konakart.admin_manager.AdminEngineCacheMgr = com.konakartadmin.bl.AdminEngineCacheMgrEE
      konakart.admin_manager.ExportMgr = com.konakart.bl.ExportMgrEE
      konakart.admin_manager.AdminFileMgr = com.konakartadmin.bl.AdminFileMgrEE
      konakart.admin_manager.AdminFilterMgr = com.konakartadmin.bl.AdminFilterMgrEE
      konakart.admin_manager.AdminImportMgr = com.konakartadmin.bl.AdminImportMgrEE
      konakart.admin_manager.AdminOrderMgr = com.konakartadmin.bl.AdminOrderMgrEE
      konakart.admin_manager.AdminProductMgr = com.konakartadmin.bl.AdminProductMgrEE
      konakart.admin_manager.AdminPromotionMgr = com.konakartadmin.bl.AdminPromotionMgrEE
      konakart.admin_manager.AdminReviewMgr = com.konakartadmin.bl.AdminReviewMgrEE
      konakart.admin_manager.AdminSecurityMgr = com.konakartadmin.bl.AdminSecurityMgrEE
      konakart.admin_manager.AdminServletMgr = com.konakartadmin.bl.AdminServletMgrEE
      konakart.admin_manager.AdminSuggestionMgr = com.konakartadmin.bl.AdminSuggestionMgrEE
      
      

    3. konakartadmin_gwt.properties

      Modify this file as required to set the Engine class that will be used for the Admin Application. The file is deployed to {konakart}/webapps/konakartadmin/WEB-INF/classes/ .

      The following example shows a setup where the JSON version of the Admin Engine is used:

      
      # ----------------------------------------------------------------------
      # KonaKart engine class used by the KonaKart Admin Application users
      #
      # For the default engine use:         com.konakartadmin.bl.KKAdmin
      # For the web services engine use:    com.konakartadmin.ws.KKWSAdmin
      # For the RMI services engine use:    com.konakartadmin.rmi.KKRMIAdminEng
      # For the JSON services engine use:   com.konakartadmin.json.KKJSONAdminEng
      # For the JAXWS services engine use:  com.konakartadmin.jws.KKJAXWSAdmin
      
      #konakartadmin.gwt.engineclass=com.konakartadmin.bl.KKAdmin
      #konakartadmin.gwt.engineclass=com.konakartadmin.ws.KKWSAdmin
      #konakartadmin.gwt.engineclass=com.konakartadmin.rmi.KKRMIAdminEng
      
      konakartadmin.gwt.engineclass=com.konakartadmin.json.KKJSONAdminEng
      
      #konakartadmin.gwt.engineclass=com.konakartadmin.jws.KKJAXWSAdmin
      
      

    4. konakart.properties

      The changes required are dependent on the chosen Engine Mode.

      The database parameters should be set up in the same way as you did in the konakartadmin.properties file (see above).

      For Multi-Store Multiple Databases Mode (Engine Mode 1) you need to define the databases that are used for each store. These parameters can be ignored for other Engine Modes. This is an example of a two database setup with databases store1 and store2:

      
      # Enterprise Feature
      # The databases actually used in a multi store / multi database environment
      konakart.databases.used = store1 store2
      
      

    5. Populate the Database ready for the Enterprise Extensions

      This is an example of a Windows BAT file that you should run for setting up a Multi-Store Single DB (Engine Mode 2) system. This utility also creates a second sample store (called "store2") just as is done in the automated installation process. You need to configure the properties files (see above) before executing this program because it needs to know the chosen configuration:

      
      @echo off
      rem
      rem Set up database for KonaKart Enterprise Extensions
      rem Also sets up a second sample store (store2) in the database 
      rem  - Manual Installation Only
      rem
      rem  Normally this is executed by the Enterprise Extensions Installation Wizard.
      rem
      rem  Always use the Enterprise Extensions Installation Wizard in preference to
      rem  running this manually.
      rem
      
      set INSTALL_DIR=C:\KonaKart
      set WEBAPPS_DIR=C:\KonaKart\webapps
      set DBDIR=MySQL
      set SHARED_CUSTOMERS=True
      set SHARED_PRODUCTS=True
      set SHARED_CATS=True
      
      set CP=%WEBAPPS_DIR%\konakartadmin\WEB-INF\classes
      set CP=%CP%;%WEBAPPS_DIR%\konakartadmin\WEB-INF\lib\*
      set CP=%CP%;%WEBAPPS_DIR%\konakart\WEB-INF\lib\*
      
      "%JAVA_HOME%\bin\java" -cp "%CP%"                    ^
      	com.konakartadmin.utils.CreateEnterpriseDB       ^
      	-p  "%WEBAPPS_DIR%/konakartadmin/WEB-INF/classes/konakartadmin.properties" ^
      	-h  "%INSTALL_DIR%"                              ^
      	-db %DBDIR%                                      ^
      	-ps %SHARED_PRODUCTS%                            ^
      	-cs %SHARED_CATS%                                ^
      	-c  %SHARED_CUSTOMERS%                           
      
      rem
      rem  The "-d" parameter can be added to enable debugging.  This is useful if you 
      rem  have problems.
      rem