Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Oracle Weblogic 11g

Oracle Weblogic 11g

This section explains how to deploy Elastic Path web applications on a Weblogic production server.

Note: Before you begin
Make sure that:
  • The target server has at least 6GB or RAM and at least 3GB dedicated to Weblogic (all apps in a single instance, less if running Cortex separately from Search, etc.)
  • A Java 7 JDK or JRE is installed.
  • Oracle Weblogic 11g is installed.
  • You have the Web Application .WAR files that were specifically built for Weblogic.
  • You have created a database for Elastic Path.
  • You have unzipped the assets archive to a known location.
  • You have synchronized the date and time of all application servers with the date and time of your database server.

Installing Java Advanced Imaging

If you are using Storefront, you must install Java Advanced Imaging into your production server's JDK as detailed below:

  1. Go to: http://download.java.net/media/jai/builds/release/1_1_3/
  2. Download and unzip jai-1_1_3-lib.zip
  3. Copy the contents of JAI_HOME\lib to your Java_HOME\jre\lib\ext directory.

Preparing the Weblogic Domain

Creating the Domain

  1. Start the WebLogic Configuration Wizard.
    • On Windows, from the Start menu, choose All Programs -> Oracle Weblogic -> Quickstart and select Getting Started with Weblogic Server 10.3.
    • On Linux, launch <WEBLOGIC_HOME>/wlserver_10.3/common/bin/config.sh.
      Note:

      You must have an X server configured to use the GUI configuration tool.

  2. Select Create a new WebLogic domain and click Next.
  3. Select Generate a domain configured automatically to support the following Products and click Next.
  4. Enter a domain name and click Next.
  5. Enter a user name and password for the WebLogic administrator account and click Next.
  6. Select Sun SDK 1.7 in the Available JDKs list or select Other JDK and specify the Java Development Kit with Java Advanced Imaging installed.
  7. Make sure Production Mode is selected and click Next.
  8. Click Next without selecting any optional configurations.
  9. Review the Configuration Summary and click Create.
  10. WebLogic creates the domain in the <WEBLOGIC_HOME>/user_projects/domains directory.
  11. Click Done.

Installing a JDBC Driver

  1. Download the JDBC Driver for your chosen database:
    Note:
    Database JDBC Driver JAR file

    MySQL 5.6

    mysql-connector-java-5.1.25.jar

    MS SQL 2008

    mssqlserver-2005-1.2.jar

    Oracle 11g

    ojdbc15-11.1.0.7.0.jar

  2. Place the JDBC Driver JAR file in <DOMAIN_HOME>/lib

Configuring Startup Scripts

  • On Windows, open <DOMAIN_HOME>\bin\setDomainEnv.cmd with a text editor and add the following:
    set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0
    set USER_MEM_ARGS=-Xms3072m -Xmx3072m -XX:MaxPermSize=512m
    set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dsun.lang.ClassLoader.allowArraySyntax=true
    
    For production Weblogic deployments add the following environment variable:
    
    DOMAIN_PRODUCTION_MODE="true"
    export DOMAIN_PRODUCTION_MODE 
  • On Linux, open <DOMAIN_HOME>/bin/setDomainEnv.shwith a text editor and add the following:
    JAVA_OPTIONS="${JAVA_OPTIONS} -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0"
    export JAVA_OPTIONS
    USER_MEM_ARGS=-Xms3072m -Xmx3072m -XX:MaxPermSize=512m
    export USER_MEM_ARGS
    EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -Dsun.lang.ClassLoader.allowArraySyntax=true
    export EXTRA_JAVA_PROPERTIES
    
    For production Weblogic deployments add the following environment variable:
    
    DOMAIN_PRODUCTION_MODE="true"
    export DOMAIN_PRODUCTION_MODE  

Extracting the Application Archives

The Elastic Path web applications need direct access to the file system, which means that they must be deployed in exploded form.

  1. In <DOMAIN_HOME>, create a directory (ie. EPWARs) for deploying Elastic Path WAR files.
  2. For each web application you want to deploy:
    1. Create a subdirectory inside the directory you just created. Name these subdirectories after the web application. (ie. storefront)
    2. Copy the web application's WAR file into your new subdirectory.
    3. In the command prompt, navigate to your subdirectory.
    4. Enter the following command to extract the WAR file's contents:
      jar -xvf storefront.war
      

Configuring the Weblogic Domain

  1. Start WebLogic Server from the command prompt.
    • On Windows, launch <DOMAIN_HOME>\startWebLogic.cmd.
    • On Linux, launch <DOMAIN_HOME>/startWebLogic.sh.
  2. In a web browser, go to http://localhost:7001/console. This opens the Weblogic Administration Console.
  3. Log in using your domain's username and password.
  4. In the WebLogic Administration Console, under Change Center, click Lock & Edit.

Configuring SSL

  1. In the Domain Structure tree, expand the Elastic Path domain and click Environment -> Servers.
  2. In the Servers list, click AdminServer(admin).
  3. In Configuration -> General, select SSL Listen Port Enabled.
  4. Click Save.

Configuring the JNDI data source

  1. In the Domain Structure tree, expand the Elastic Path domain and select Services -> JDBC -> Data Sources.
  2. In the Summary of JDBC Data Sources pane, under Data Sources, click New.
  3. In the JDBC Data Source Properties page, enter the following information and click Next:
    Name jdbc/epjndi

    JNDI Name

    jdbc/epjndi

    Database Type

    Select your database platform (Oracle, MySQL, MS SQL Server).

    Database Driver

    Select the database driver name. (See the table below)

    Database Database Driver

    MySQL 5.6

    MySQL's Driver (Type 4) Versions:using com.mysql.jdbc.Driver

    MS SQL 2008

    Microsoft's MS SQL Server Driver (Type 4) Versions:2005

    Oracle 11g

    Oracle's Driver (Thin) for Instance connections; Versions: 9.0.1,9.2.0,10,11

  4. In the Transaction Options page, click Next.
  5. In the Connection Properties page, enter your database connection information and click Next.
  6. Note:

    If you are using a MySQL Database, enter the following Properties under the Properties box in the Test Database Connection page:

    useUnicode=true
    user=<USERNAME>
    characterEncoding=utf-8
    AutoReconnect=true
    In the Test Database Connection page, click Test Configuration. If your connection information is correct, you will see a success message.WeblogicTestSuccessful.png
  7. Click Next.
  8. In the Select Targets page, select AdminServer and click Next.
  9. Click Finish.

Configuring the JMS Server

Create a new JMS Server

  1. In the Domain Structure tree, expand the Elastic Path domain, and select Services -> Messaging -> JMS Servers
  2. Create a new server with the following properties:Name: Weblogic-JMS-ServerPersistent Store: (none)
  3. Click Next and select AdminServer for the Target.
  4. Click finish.

Create a new JMS Module

  1. In the Domain Structure tree, expand the Elastic Path domain, and select Services -> Messaging -> JMS Modules
  2. Create a new JMS Module with the following properties:Name: Weblogic-JMS-Module
  3. Click Next, select AdminServer for the Target, and click Next.
  4. Select the Would you like to add resources to this JMS system module? check box and click Finish.

    jms_system_module.png

Create a Subdeployment for the Weblogic-JMS-Module

  1. In the Domain Structure tree, select Services -> JMS Modules -> Weblogic-JMS-Module and click the Subdeployments tab.
  2. Create a new Subdeployment with the following properties:
    • Name: Weblogic-JMS-Subdeployment
  3. Click Next, select AdminServer for the target, and click Finish.

Create resources for the Weblogic-JMS-Module

Create the following resources:

jms_module_resources.png

Create the Weblogic-Connection-Factory resource:

  1. Select Services -> JMS Modules -> Weblogic-JMS-Module
  2. Under Summary of Resources, click New.
  3. Select Connection Factory and click Next.
  4. Specify the following Connection Factory properties:
    • Name: Weblogic-Connection-Factory
    • JDNI Name: jms/JMSConnectionFactory
    • Subscription Sharing Policy: Exclusive
    • Client ID Policy: Restricted
    • Maximum Messages per Sessions: 10
    • XA Connection Factory Enabled: disabled
  5. Click Next and click the Advanced Targeting button.
  6. In the Subdeployment drop-down list, select Weblogic-JMS-Subdeployment.
  7. Click Finish.

Create the ep.orders resource:

  1. Select Services -> JMS Modules -> Weblogic-JMS-Module
  2. Under Summary of Resources, click New.
  3. Select Topic and click Next.
  4. Specify the following JMS Destination properties:
    • Name: ep.orders
    • JDNI Name: jms/ep.orders
    • Template: None
  5. Click Next.
  6. In the Subdeployments drop-down list, select Weblogic-JMS-Subdeployment.
  7. Click Finish.

Repeat this process for all topics and queues listed in Configuring Event Message Channels for consumption

When you are done, click Activate Changes under Change Center.

Note:

The CM Server and Integration Server applications contain the Camel JMS consumers which consume messages from the various JMS topics and queues.

For production deployments, monitoring should be in place to check the number of messages in the JMS topics and queues and send alerts if the number of messages waiting to be consumed exceeds an acceptable threshold. Monitoring of the JMS topics and queues can be done through the Weblogic WLST API.

If the JMS consumers are unable to keep up with the number of incoming messages, try increasing the number of threads in the CM Server or Integration Server work manager the Weblogic administration console.

Deploying Path Web Applications

  1. In the Domain Structure tree, expand the Elastic Path domain and click Deployments.
  2. Do the following for each Elastic Path web application you want to deploy:
    1. In the Summary of Deployments pane, click Install.
    2. Locate the directory where you extracted the war files. Click the radio button next to the subdirectory name and click Next.

      Weblogic Deploy.PNG

    3. Select Install this deployment as an application and click Next.
    4. In the Optional Settings page, under Source accessibility, select the I will make the deployment accessible from the following location option. Then click Finish.
  3. When you are done, click Activate Changes under Change Center.
    Note:
    The EP database will need to updated to change the JMS endpoint names to the Weblogic accepted format:
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:topic:./Weblogic-JMS-Module!ep.orders' where uidpk = 115;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:topic:./Weblogic-JMS-Module!ep.changesets' where uidpk = 116;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:queue:./Weblogic-JMS-Module!ep.emails' where uidpk = 131;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:queue:./Weblogic-JMS-Module!ep.emailsdlq' where uidpk = 132;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:topic:./Weblogic-JMS-Module!ep.giftcertificates' where uidpk = 133;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:topic:./Weblogic-JMS-Module!ep.customers' where uidpk = 134;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:topic:./Weblogic-JMS-Module!ep.cmusers' where uidpk = 135;
    update TSETTINGDEFINITION set DEFAULT_VALUE='jms:topic:./Weblogic-JMS-Module!ep.dataimport' where uidpk = 136;
    
    If you have already tried to deploy the applications in Weblogic you will need to restart the applications or the WebLogic server before the new settings take effect.