You can set up a sample store within your production environment to use multiple store
enterprise (EAR) archives. You can use the multiple archives to separate store pages for specific
components into one archive, with the store pages for the remaining components in another
archive.
Before you begin
- In your production environment, complete the following task for your Aurora-based store:
- In your development environment, complete the following task for your Aurora-based store: In the following steps, you export the multiple EAR files, Store, and
Stores1 from your development environment into your production
environment.
About this task
The sample store that is created for a production environment with the following steps is based
on the Aurora extended sites store that is provided with Feature Pack 7. The steps use a store ID
value of 715838534 for the Aurora Storefront Asset Store. If the store ID on your environment is
different, replace the store ID with the value for your store ID.
These steps separate only order and payment store pages into a separated WAR file from remaining
store pages. To separate a different store component into a new store WAR file, the EJB references,
struts configuration, and code files that you need to move, change, or create are different.
Procedure
-
In your development environment, export the store EAR files. For more information about
exporting an EAR file, see Identifying and packaging J2EE assets for a single file.
-
Transfer the exported EAR files to your production environment.
-
Update the separated store EAR in your production environment with the contents of the exported
store EAR file from your development environment that does not include the order and payment store
assets. For more information about how to merge the assets in an exported EAR file into an EAR file
in your production environment, see Deploying J2EE assets for an entire module.
-
Install the new store EAR, WCStores1_demo, to the WebSphere Commerce
instance in your production environment.
-
Open the WebSphere Application Server administration console.
-
Expand Applications and click .
-
In the Preparing for the application installation pane, browse to the
location for the WCStores1_demo EAR file from your development environment.
Click NextNext.
-
In the Select installation options pane, specify the following information
for the options to installing this new enterprise application:
- Directory to install application
- WC_profiledir\installedApps\cell_name
- Application name
- WCStores1_demo
- File Permission
-
.*\.war$=755#.*\.war/WEB-INF$=750#.*\.gif=755#.*\.js=755#.*\.swf=755#
.*\.htm=755#.*\.html=755#.*\.png=755#.*\.bmp=755#.*\.css=755#.*\.jpg=755#
.*\.doc=755#.*\.xls=755#.*\.ppt=755#.*\.ra=755#.*\.rpm=755#.*\.gz=755#
.*\.pdf=755#.*\.ps=755#.*\.zip=755#.*\.gtar=755#.*\.tar=755#.*\.wav=755#
.*\.jpe=755#.*\.jpeg=755#.*\.text=755#.*\.txt=755#.*\.mpg=755#.*\.mpeg=755#
.*\.mov=755#.*\.avi=755#.*\.qt=755#.*\.wmv=755#.*DTDGenerator\.zip=750#
.*loader/DB2Load\.zip=750#.*IdResGen\.zip=750#.*loader/Logger\.zip=750#
.*loader/MassExtract\.zip=750#.*loader/MassLoader\.zip=750#
.*loader/PropGen\.zip=750#.*loader/SAFServ\.zip=750#
.*loader/TextTransformer\.zip=750#.*loader/WCALogger\.zip=750#
.*loader/WCMCommon\.zip=750#.*loader/XMLTransformer\.zip=750#
.*loader/dbconnect\.zip=750#.*payment/etillCal\.zip=750#.*\.WAR$=755#
.*\.WAR/WEB-INF$=750#.*\.GIF=755#.*\.JS=755#.*\.SWF=755#.*\.HTM=755#
.*\.HTML=755#.*\.PNG=755#.*\.BMP=755#.*\.CSS=755#.*\.JPG=755#.*\.DOC=755#
.*\.XLS=755#.*\.PPT=755#.*\.RA=755#.*\.RPM=755#.*\.GZ=755#.*\.PDF=755#
.*\.PS=755#.*\.ZIP=755#.*\.GTAR=755#.*\.TAR=755#.*\.WAV=755#.*\.JPE=755#
.*\.JPEG=755#.*\.TEXT=755#.*\.TXT=755#.*\.MPG=755#.*\.MPEG=755#.*\.MOV=755#
.*\.AVI=755#.*\.QT=755#.*\.WMV=755#.*\.def=750#.*\.DEF=750#
.*lib/icu4j\.zip=640#.*zero$=755#.*appbuilder$=755
Note: The preceding value is separated across multiple lines for readability. When you enter this
value for the File Permission, enter the value as a single line.
-
In the Map modules to servers pane, include server1
and webserver1 in the Clusters and servers list.
Select the Stores1 module.
-
Click
-
Expand . Click WebSphere enterprise applications. In the list of
available applications, click the WCStores1_demo application.
-
In the Web Module Properties section, click Virtual
hosts. Select the Stores1 module.
-
Expand Apply Multiple Mappings and change the virtual host for the
application to be VH_demo. Click Apply.
-
Update the struts configuration files in your environment to make sure that the store ID is
correct for the Stores WAR in your production environment.
-
Download and extract the following struts template for your original store WAR in a temporary
folder.
-
Copy the files in the extracted struts templates temporary folder.
-
Go to the Stores\WebContent\WEB-INF directory.
-
Add the copied files to the directory and override the existing struts configuration
files.
-
Update the struts configuration files in your environment to make sure that the store ID is
correct for the WCStores1 WAR in your production environment.
-
Download and extract the following struts template for your original store WAR in a temporary
folder.
-
Copy the files in the extracted struts templates temporary folder.
-
Go to the Stores1\WebContent\WEB-INF directory.
-
Add the copied files to the directory to create the struts configuration files.
-
Configure the extended document root for your two store WAR files. The extended document root
allows JSP file resources to be shared across WAR files.
-
Go to the
WC_profiledir/installedApps/cell_name/WCStores_instance_name.ear/Stores.war/WebContent/WEB-INF
directory. Open the ibm-web-ext.xml file for editing.
-
Update the development environment configuration for the store archive to use the path value
for your production environment.
Locate the following
configuration:
<jsp-attribute name="extendedDocumentRoot" value="workspace_dir/Stores1/WebContent"/>
Change
the configuration to have the following
value:
<jsp-attribute name="extendedDocumentRoot"
value="WC_profiledir/installedApps/cell_name/WCStores1_instance_name.ear/Stores.war" />
-
Go to the
WC_profiledir/installedApps/cell_name/WCStores1_instance_name.ear/Stores1.war/WebContent/WEB-INF
directory. Open the ibm-web-ext.xml file for editing.
-
Update the development environment configuration for the store archive to use the path value
for your production environment.
Locate the following
configuration:
<jsp-attribute name="extendedDocumentRoot"
value="workspace_dir/Stores/WebContent"/>
Change
the configuration to have the following
value:
<jsp-attribute name="extendedDocumentRoot"
value="WC_profiledir/installedApps/cell_name/WCStores_instance_name.ear/Stores.war" />
-
Save and close the files.
-
Update the configuration file for the web server to map the WebSphere Commerce store alias to the store WAR within each
store EAR application:
-
Regenerating the WebSphere Application Server Web server plug-in configuration file.
-
Enable multiple store WAR files for your WebSphere Commerce instance in the
wc-server.xml for your site:
-
Go to the WC_eardir/xml/config directory and open the
wc-server.xml file for editing.
-
Search for
StoreWebModuleName="Stores"
in the file. Add the configuration
MultipleStoreWARs="true"
to the file
For example,
<Instance
...
StoreWebModuleName="Stores"
MultipleStoreWARs="true"
.../>
-
Save and close the file. You must republish the WebSphere Commerce application before the
change takes effect.
- Optional:
If the new store module has its own parameters, register new WAR file in WebSphere Commerce by
adding the new web modules into the wc-server.xml file.
For
example,
<Module contextPath="/webapp/wcs/stores1" fileServletEnabled="false"
name="Stores1" urlMappingPath="/servlet" webAlias="/wcsstore">
<InitParameters adapters="XML/HTTP, BrowserAdapter"
contextSetName="Store" handleDoubleClick="true"/>
<URLRedirectFilter enable="false"/>
</Module>
-
Update the shared library for the separated store archive environment to include the resource
bundles that your new store archive needs to access.
-
In the WebSphere Application Server, expand Environment. Click
Shared libraries.
-
Click the shared library that you need to update. The General Properties
for the library open.
-
Add the following directory and files to the list of class paths.
Store_archivedir/WEB-INF/classes
-
Remove the following class paths from the shared library
- Store_archivedir/WEB-INF/base.tld
- Store_archivedir/WEB-INF/coremetrics.tld
- Store_archivedir/WEB-INF/flow.tld
- Store_archivedir/WEB-INF/stores.tld
- Store_archivedir/WEB-INF/wcfSSFS.tld
- Store_archivedir/WEB-INF/wcpgl.tld
- Store_archivedir/WEB-INF/json.tld
-
Click .
-
Change the file permission of the two store archives for the sample store.
To change the file permission of the
WCStores1_demo.ear and
WCStores_demo.ear archives by running the following commands in a command-line utility:
- chmod 755
WC_profiledir/installedApps/WC_demo_cell/WCStores_demo.ear
- chmod 755
WC_profiledir/installedApps/WC_demo_cell/WCStores1_demo.ear
-
Restart the server1 and webserver applications.
-
Open your store and complete a shopping flow to verify that your store functions
correctly.