Oracle Weblogic 11g
Oracle Weblogic 11g
This section explains how to deploy Elastic Path Commerce web applications on a Weblogic production server.
- 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:
- Go to: http://download.java.net/media/jai/builds/release/1_1_3/
- Download and unzip jai-1_1_3-lib.zip
- Copy the contents of JAI_HOME\lib to your Java_HOME\jre\lib\ext directory.
Preparing the Weblogic Domain
Creating the Domain
- 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.
- Select Create a new WebLogic domain and click Next.
- Select Generate a domain configured automatically to support the following Products and click Next.
- Enter a domain name and click Next.
- Enter a user name and password for the WebLogic administrator account and click Next.
- 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.
- Make sure Production Mode is selected and click Next.
- Click Next without selecting any optional configurations.
- Review the Configuration Summary and click Create.
- WebLogic creates the domain in the <WEBLOGIC_HOME>/user_projects/domains directory.
- Click Done.
Installing a JDBC Driver
- 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
- 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.
- In <DOMAIN_HOME>, create a directory (ie. EPWARs) for deploying Elastic Path WAR files.
- For each web application you want to deploy:
- Create a subdirectory inside the directory you just created. Name these subdirectories after the web application. (ie. storefront)
- Copy the web application's WAR file into your new subdirectory.
- In the command prompt, navigate to your subdirectory.
- Enter the following command to extract the WAR file's contents:
jar -xvf storefront.war
Configuring the Weblogic Domain
- Start WebLogic Server from the command prompt.
- On Windows, launch <DOMAIN_HOME>\startWebLogic.cmd.
- On Linux, launch <DOMAIN_HOME>/startWebLogic.sh.
- In a web browser, go to http://localhost:7001/console. This opens the Weblogic Administration Console.
- Log in using your domain's username and password.
- In the WebLogic Administration Console, under Change Center, click Lock & Edit.
Configuring SSL
- In the Domain Structure tree, expand the Elastic Path domain and click Environment -> Servers.
- In the Servers list, click AdminServer(admin).
- In Configuration -> General, select SSL Listen Port Enabled.
- Click Save.
Configuring the JNDI data source
- In the Domain Structure tree, expand the Elastic Path domain and select Services -> JDBC -> Data Sources.
- In the Summary of JDBC Data Sources pane, under Data Sources, click New.
- 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
- In the Transaction Options page, click Next.
- In the Connection Properties page, enter your database connection information and click Next.
- Note:In the Test Database Connection page, click Test Configuration. If your connection information is correct, you will see a success message.
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
- Click Next.
- In the Select Targets page, select AdminServer and click Next.
- Click Finish.
Configuring the JMS Server
Create a new JMS Server
- In the Domain Structure tree, expand the Elastic Path domain, and select Services -> Messaging -> JMS Servers
- Create a new server with the following properties:Name: Weblogic-JMS-ServerPersistent Store: (none)
- Click Next and select AdminServer for the Target.
- Click finish.
Create a new JMS Module
- In the Domain Structure tree, expand the Elastic Path domain, and select Services -> Messaging -> JMS Modules
- Create a new JMS Module with the following properties:Name: Weblogic-JMS-Module
- Click Next, select AdminServer for the Target, and click Next.
- Select the Would you like to add resources to this JMS system module? check box and click Finish.
Create a Subdeployment for the Weblogic-JMS-Module
- In the Domain Structure tree, select Services -> JMS Modules -> Weblogic-JMS-Module and click the Subdeployments tab.
- Create a new Subdeployment with the following properties:
- Name: Weblogic-JMS-Subdeployment
- Click Next, select AdminServer for the target, and click Finish.
Create the Weblogic-Connection-Factory resource:
- Select Services -> JMS Modules -> Weblogic-JMS-Module
- Under Summary of Resources, click New.
- Select Connection Factory and click Next.
- 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
- Click Next and click the Advanced Targeting button.
- In the Subdeployment drop-down list, select Weblogic-JMS-Subdeployment.
- Click Finish.
Create the ep.orders resource:
- Select Services -> JMS Modules -> Weblogic-JMS-Module
- Under Summary of Resources, click New.
- Select Topic and click Next.
- Specify the following JMS Destination properties:
- Name: ep.orders
- JDNI Name: jms/ep.orders
- Template: None
- Click Next.
- In the Subdeployments drop-down list, select Weblogic-JMS-Subdeployment.
- 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.
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
- In the Domain Structure tree, expand the Elastic Path domain and click Deployments.
- Do the following for each Elastic Path web application you want to deploy:
- In the Summary of Deployments pane, click Install.
- Locate the directory where you extracted the war files. Click the radio button next to the subdirectory name and click Next.
- Select Install this deployment as an application and click Next.
- In the Optional Settings page, under Source accessibility, select the I will make the deployment accessible from the following location option. Then click Finish.
- 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.