- Register with the store in the test environment as a test customer; then place items in the shopping cart.
- For the ORDERS table, run an SQL query to simulate an abandoned cart for the test customer.For example, if the criteria for the trigger is "Check for customers with carts abandoned for 3 days," then manually change the ORDERS.LASTUPDATE data so that the last update date for the test customer's order was three days ago:
- To get the order ID and order time for the test customer's order, run the following SQL query:
SELECT ORDERS_ID, LASTUPDATE FROM ORDERS WHERE MEMBER_ID = (SELECT USERS_ID FROM USERREG WHERE LOGONID='logon_ID') ORDER BY ORDERS_ID DESCWhere logon_ID is the test customer's logon ID created during registration. - To set the last update date for this order to be, for example, 3 days in the past, run the following SQL query:
Where:UPDATE ORDERS SET LASTUPDATE = 'updated_order_time' WHERE ORDERS_ID = order_ID- updated_order_time
- is the timestamp to represent when the cart was abandoned for testing purposes. Use the same timestamp format used for the order time you retrieved with the first SQL query.
- order_ID
- is the ID of the test customer's order that you retrieved with the first SQL query
- To get the order ID and order time for the test customer's order, run the following SQL query:
- Run an SQL query to force the daily processing of the trigger to occur again.Once a day at 2:00 a.m. (by default), the marketing services send the Customer Abandons Shopping Cart trigger to be processed by the SendMarketingTriggers scheduled job. On the day you are testing, if the send time has already passed, you can resend the trigger for processing. To do so, use the following SQL query to remove the entry from the DMACTATTR table that records that the trigger has already been processed. As a result, the trigger will be processed the next time the SendMarketingTriggers scheduled job runs.
DELETE FROM DMACTATTR WHERE DMACTIVITY_ID = 0 OR DMACTIVITY_ID = (SELECT DMACTIVITY_ID FROM DMACTIVITY WHERE NAME = 'activity_name');Where activity_name is the name of the activity you are testing. - Using the Administration Console, either run the SendMarketingTriggers jobmanually or wait for the next time the job runs according to its schedule interval setting.
Search This Blog
Thursday, November 29, 2012
Testing dialog activity - Customer Abandons Shopping Cart
Tuesday, November 27, 2012
WCBD for websphere commerce 6.0
WCBD with websphere commerce version 7.0 can be used with websphere commerce 6.0 as well.
Just few jar and needs to be replaced those are already available with WCS 6.0 installation
Just few jar and needs to be replaced those are already available with WCS 6.0 installation
Monday, November 26, 2012
Enabling UTF8 encoding on websphere commerce
To use multiple language encoding support in the administrative console, you must configure an application server with UTF-8 encoding enabled.
Steps for this task
- On the Application Server page, click on the name of the server you want enabled for UTF-8. (Servers > Server Types > Websphere application servers)
- On the settings page for the selected application
server, click Process Definition. (Server Infrastructure > Java and
Process Management > Process definition)
- On the Process Definition page, click Java Virtual
Machine.
- On the Java Virtual Machine page, in Generic JVM
Arguments, insert the following value -Dclient.encoding.override=UTF-8
and click OK.
- Click Save on the console taskbar.
- Restart the application server.
Note that the autoRequestEncoding option does not work with UTF-8 encoding
enabled. The default behavior for WebSphere Application Server is, first, to
check if charset is set on content type header. If it is, then the product uses
content type header for character encoding; if it is not, then the product uses
character encoding set on server using the system property
default.client.encoding. If charset is not present and the system property is
not set, then the product uses ISO-8859-1. Enabling autoRequestEncoding on a
Web module changes the default behavior: if charset it not present on an
incoming request header, the product checks the Accept-Language header of the
incoming request and does encoding using the first language found in that
header. If there is no charset on content type header and no Accept language
header, then the product uses character encoding set on server using the system
property default.client.encoding. As with the default behavior, if charset is
not present and the system property is not set, then the product uses
ISO-8859-1.
Further documentation surrounding this can be found at:
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-zos&topic=trun_svr_utf
Further documentation surrounding this can be found at:
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-zos&topic=trun_svr_utf
Sunday, November 25, 2012
Websphere Commerce webservice client slow performance
When WebSphere Application Server
functions as a JAX-RPC or JAX-WS webservice client, an intermittent web service
performance problem can result.
The delay occurs after the
client-side JAX-RPC handler (if present) is invoked and before the actual SOAP
message is sent to the provider. Because
the delay occurs in the IBM web services engine, this problem can be difficult
to detect.
Depending on the quality of
service coded into the application itself, there might be application related
timeouts which can occur. However, the
problem can occur without the presence of any exceptions or errors logged to
the SystemOut.log.
A build-up of threads waiting on
a HashMap in the Web services engine OutboundConnectionCache can occur if a
thread requests a connection and creating the connection will cause the number
of connections in the OutboundConnectionCache to exceed the maximum
connection's limit. This is expected
behavior in high load situations, but unfortunately these same symptoms could
indicate a problem in the outbound connection pool.
Adding monitoring code to the
OutboundConnectionCache will diagnose these kinds of problems.
The web service runtime maintains
a pool of outbound connections. The pool
contains connections that are currently in-use, connections that have
recently been used, and connections that are no longer in use.
If a web service application
needs to establish a new connection and the web service pool is full, the web
service application is forced to wait until a connection is available from the
pool. This is the correct behaviour and
allows the web service engine to execute in temporary high load situations. High load is defined as connections having to
wait due to a lack of space in the pool.
However, when these high load
scenarios occur we currently do not have sufficient debug trace to examine the
status of the connection pool or examine the wait times. In addition, customers who experience these
high loads don't want to turn on extensive debug trace because gathering trace
may degrade performance.
As a result, several customers
have asked for a trace setting that can be used to capture connection pool and
wait time information without significantly impacting performance.
This APAR introduces new JAX-RPC
and JAX-WS settings that can
be used to gather connection pool
information.
The new setting for JAX-RPC
is:
com.ibm.ws.webservices.engine.transport.channel.Monitor=all=enabled
The new setting for JAX-WS
is:
com.ibm.ws.websvcs.transport.channel.Monitor=all=enabled
trace will show
entries similar to these which
repeat:
[8/19/09 18:08:29:658 GMT]
00000047 OutboundConne 1 Enter:
WSWS3595I: Current pool size: 25.
Connections-in-use size: 0.
Configured pool size: 25
In addition, that same trace spec
will show long delays in
executing the
.findGroupAndGetConnection() method:
[8/19/09 18:08:03:428 GMT]
00000047 OutboundConne >
OutboundConnectionCache.findGroupAndGetConnection()
WAITING_THREADS_THRESHOLD is 5
Entry
<WSWS3595I repeats in
between>
[8/19/09 18:08:38:358 GMT]
00000047 OutboundConne <
OutboundConnectionCache.findGroupAndGetConnection()
Exit
Quick Fix.
- Reduce the
'com.ibm.websphere.webservices.http.connectionPoolCleanUpTime'
from the default of 180 to 120
seconds
- Increase the max connections
'com.ibm.websphere.webservices.http.maxConnection'
property from
default of 25 to 50.
This will also require increasing
the web container thread pool
size to 100.
For more details please refer
to
http://www-01.ibm.com/support/docview.wss?uid=swg1PK94494
http://www-01.ibm.com/support/docview.wss?uid=swg1PK77273
Friday, November 23, 2012
Differentiate cache id for mobile and base stores
The Madisons mobile starter store has some shared views with Madisons starter store.
For these shared views, how can different cache-ids be generated to cache the mobile version of the page separate from the non-mobile version of the same page?
1) In the wc-server.xml file, add the following code to /config/Components/component[name="DynaCacheFilterMappings"]:
<map className="com.ibm.commerce.dynacache.filter.DeviceFormatIdCallBack" display="false" dynacacheAttributeName="DC_deviceFormatId" methodName="setDeviceFormatId" name="setDeviceFormatId"/>
This callback is used to generate the CacheFilter attribute "DC_deviceFormatId"
2) In the cachespec.xml file, add the following to all cache-id entries that are shared by the base store and the mobile store:
<component id="DC_deviceFormatId" type="attribute">
<required>true</required>
</component>
<map className="com.ibm.commerce.dynacache.filter.DeviceFormatIdCallBack" display="false" dynacacheAttributeName="DC_deviceFormatId" methodName="setDeviceFormatId" name="setDeviceFormatId"/>
This callback is used to generate the CacheFilter attribute "DC_deviceFormatId"
2) In the cachespec.xml file, add the following to all cache-id entries that are shared by the base store and the mobile store:
<component id="DC_deviceFormatId" type="attribute">
<required>true</required>
</component>
Friday, November 16, 2012
Cleaning WCS developer database using DBClean
- You need to copy these files from Windows installation of WCS..
- Copy setenv.bat as setenv_DBClean.bat in {Toolkit_Home}\bin
- Edit setenv_DBClean.bat and add the following line at the top of the file (without the ‘—>’ of course)
—> SET DB2_DRIVER={DB2_HOME}\java\db2java.zip
where {DB2_HOME} is the value of your DB2 install root.
Also change the .. to {WC6Toolkit_Home} so it looks like
—> call setshortname WCS_HOME {Toolkit_Home}
—> call setshortname WCLOGDIR {Toolkit_Home}\logs
—> call setshortname WCTEMPDIR {Toolkit_Home}\temp - Copy dbclean.bat from {WC_HOME}\bin to {Toolkit_Home}\bin
- Edit {Toolkit_Home}\bin\dbclean.bat
- change setenv.bat to setenv_DBClean.bat
- change the path for Enablement-BaseComponentsLogic.jar from \wc.ear to \workspace\WC
- change the path for jtopen.jar from \lib to \workspace\WC\lib - Import cleanconf rows for your toolkit’s CLEANCONF table or insert new rows as needed.
Monday, November 5, 2012
Tuning Websphere Commerce Schedulers
As of WCS 7, fix pack 2, we have few additional options to fine tune the scheduler jobs.
you can define a custom transaction timeout for scheduler Jobs which will be independent of your WAS level setting for global transaction timeout.
a. Disabling Scheduler in WCS instance
follow these steps If you have a need to not run any scheduler jobs from a given WCS instance,
Edit the wc-server.xml file of a given instance and edit the value enabled=false, this configuration will disable scheduler jobs from running on this instance.
It is important to note that by doing this you are disabling the ability of this JVM to run any Broadcast event Jobs as well.
<component
compClassName="com.ibm.commerce.scheduler.SchedulerComm"
enable="false" name="Scheduler">
<property autoClean="off" broadcastExpireTime="1800"
contextSetName="Authoring" cycleTime="600" display="false"/>
</component>
b. Defining transaction timeout for Scheduler Jobs
Here are the steps which is part of APAR IZ02770, which explains how to specify the
scheduler-specific transaction timeout settings:
Update the WC_installdir/instances/instanceName/xml/instanceName.xml
to include the new transactionTimeout field. Set the value in seconds
for your desired transaction timeout for scheduled jobs
<component
compClassName="com.ibm.commerce.scheduler.SchedulerComm"
enable="true" name="Scheduler">
<property autoClean="off"
broadcastExpireTime="1800"
transactionTimeout="1800"
contextSetName="Authoring"
cycleTime="600"
display="false">
</property>
</component>
Restart the application and test your scenario
2. Defining dedicated Container threads for Jobs
This setting might be useful if you are using WCS JVM to serve external traffic and also run some of the Scheduler jobs, the configuration defines maximum threads for various Jobs.
<component
compClassName="com.ibm.commerce.scheduler.SchedulerComm"
enable="true" name="Scheduler">
<property autoClean="off"
broadcastExpireTime="1800"
transactionTimeout="1800"
contextSetName="Authoring"
cycleTime="600"
display="false">
<applicationType applicationName="default" maxNumofThreads="10"/>
<applicationType applicationName="broadcast" maxNumofThreads="10"/>
<applicationType applicationName="auction" maxNumofThreads="10"/>
<applicationType applicationName="inventory" maxNumofThreads="10"/>
</property>
</component>
Refer following link for more details
Maintaining Scheduler
http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=/com.ibm.commerce.admin.doc/tasks/tjsmaint.htm
Websphere Commerce Scheduler Mustgather
https://www-304.ibm.com/support/docview.wss?uid=swg21454411
Use following trace component for troubleshooting and scheduler related issues.
*=info: enable.trace.log.*=all: com.ibm.websphere.commerce.WC_THREAD=all: com.ibm.websphere.commerce.WC_SERVER=all
Maintaining the WebSphere Commerce Scheduler tables
https://www-304.ibm.com/support/docview.wss?uid=swg21397348
Monday, August 6, 2012
How to solve "sorry, you must have a tty to run sudo"
As root:
vi /etc/sudoers (EDIT: please use visudo instead)
comment out: #Default requiretty
And reinstall (./install.sh)
vi /etc/sudoers (EDIT: please use visudo instead)
comment out: #Default requiretty
And reinstall (./install.sh)
Friday, August 3, 2012
Setup webmin
(1) Execute the following:
cat > /etc/yum.repos.d/webmin.repo << EOF
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
EOF
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
EOF
(2) You are done. Navigate to http://<your host>:10000
Thursday, August 2, 2012
CentOS on windows.
1. Download centos vm from http://downloads.sourceforge.net/thoughtpolicevm/centos-6.2-x86_64-server.zip
2. Unzip and run in vm player.
3. To install GNOME. Execute following command
A. yum update
B. yum groupinstall "X Window System"
C. yum groupinstall "Desktop"
D. vi /etc/inittab
E. Change id:3:initdefault: to id:5:initdefault:
F. init 6 to reboot and enjoy full centos on windows.
2. Unzip and run in vm player.
3. To install GNOME. Execute following command
A. yum update
B. yum groupinstall "X Window System"
C. yum groupinstall "Desktop"
D. vi /etc/inittab
E. Change id:3:initdefault: to id:5:initdefault:
F. init 6 to reboot and enjoy full centos on windows.
How to create linux service for jboss eap 6
1. Depending on how to run. Go to jboss installation folder and then <JBOSS_INSTALL>/bin/init.d.
2. You will find one file named jboss-as-standalone.sh. If you wanna just create service for jboss standalone. you can use this file.
3. If you wanna create service for jboss running in domain mode. Create copy of jboss-as-standalone.sh with the name of jboss-as-domain.sh.
4. Make changes in newly created jboss-as-domain.sh for point correct directories. Make sure you change.. standalone.sh to domain.sh.
5. copy file to init.d.. cp <JBOSS_INSTALL>/bin/init.d/jboss-as-XXXXX.sh /etc/init.d/jbossxxxxx
6. use chkconfig -add jbossxxxxx command to add jbossxxxxx as service.
7. now you can start jbossxxxxx as service. use service jbossxxxxx start...
8. sample copy of jboss-as-domain.sh attached here.
Sunday, July 1, 2012
Wish list in WCS
Websphere commerce wish lists are stored in IITEMLIST table.
Items in the wish list are in IITEM table.
Query to list all wishlists by registered users
select IITM.STOREENT_ID, count(distinct ITMLST.IITEMLIST_ID) as NoOfWishLists from IITEMLIST ITMLST, IITEM IITM,USERS USR, STOREENT ST where IITM.IITEMLIST_ID = ITMLST.IITEMLIST_ID and IITM.MEMBER_ID=USR.USERS_ID and USR.REGISTERTYPE = 'R' group by IITM.STOREENT_ID
Items in the wish list are in IITEM table.
Query to list all wishlists by registered users
select IITM.STOREENT_ID, count(distinct ITMLST.IITEMLIST_ID) as NoOfWishLists from IITEMLIST ITMLST, IITEM IITM,USERS USR, STOREENT ST where IITM.IITEMLIST_ID = ITMLST.IITEMLIST_ID and IITM.MEMBER_ID=USR.USERS_ID and USR.REGISTERTYPE = 'R' group by IITM.STOREENT_ID
Maven Projects in Rational application developer.
To work or import maven projects in rational application developer. We need to first activate some apache features and then install maven plugin. Here are steps..
1. Add http://q4e.googlecode.com/svn/trunk/updatesite-iam/ site and Select only Enabling Features option to install.
2. After successful installation restart RAD
3. Add http://m2eclipse.sonatype.org/sites/m2e-e34/ site. it might not show plugin in first go. Just say refresh.
4. Select maven eclipse integration plugin and install.
5. Restart RAD and you ready to import maven projects in RAD.
Friday, June 15, 2012
Reinstall WAS Admin Console
If administrative console is broken or was accidentally uninstalled (happens typically in base-version of WAS), re-deployment (reinstall) of console-application can be done with jython script deployConsole.py located in bin-folder.
1. First a clean removal of the old admin-console deployment is nessacary
3.1 Check if the <deploymenttargets>-Tag points to the correct server.
4. Take a look at /"profile root"/config/cells/"cell name"/nodes/"node name"/serverindex.xml
4.1 Check if the <deployedapplications>-Tag for application isclite
is mapped to the correct server (server1 in base version of WAS).
Now the administrative console should work again.
1. First a clean removal of the old admin-console deployment is nessacary
"System-folder"/bin/wsadmin.sh -lang jython -f deployConsole.py remove
2. Now reinstall of administrative console (isclite) will complete without errors (hopefully)
"System-folder"/bin/wsadmin.sh -lang jython -f deployConsole.py install
3. Take a look at /"profile-root"/config/cells/"cell name"/nodes/"node name"/applications/isclite.ear/deployments/isclite/deployment.xml3.1 Check if the <deploymenttargets>-Tag points to the correct server.
4. Take a look at /"profile root"/config/cells/"cell name"/nodes/"node name"/serverindex.xml
4.1 Check if the <deployedapplications>-Tag for application isclite
is mapped to the correct server (server1 in base version of WAS).
Now the administrative console should work again.
Monday, June 11, 2012
DB lock in Websphere commerce
Check what all tables are locked
SET LINESIZE 500
SET PAGESIZE 1000
SET VERIFY OFF
COLUMN owner FORMAT A20
COLUMN username FORMAT A20
COLUMN object_owner FORMAT A20
COLUMN object_name FORMAT A30
COLUMN locked_mode FORMAT A15
SELECT b.inst_id,
b.session_id AS sid,
NVL(b.oracle_username, '(oracle)') AS username,
a.owner AS object_owner,
a.object_name,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.os_user_name
FROM dba_objects a,
gv$locked_object b
WHERE a.object_id = b.object_id
ORDER BY 1, 2, 3, 4;
Find the locked DB sessions
SELECT 'ALTER SYSTEM KILL SESSION "' || SID ||
',' || SERIAL# ||'";'
FROM
(SELECT SID, SERIAL# FROM V$SESSION WHERE SID IN
(SELECT UNIQUE(b.session_id)
FROM dba_objects
a,
gv$locked_object b
WHERE a.object_id =
b.object_id)
)
Clear The lock
Execute the outcome of the above select query after
replacing double quotes with single as below.
ALTER SYSTEM KILL SESSION '17,10721';
Subscribe to:
Posts (Atom)