<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Marco Fabbri&#039;s Blog</title>
	<atom:link href="http://jeethoughts.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeethoughts.wordpress.com</link>
	<description>How to survive using IBM middleware products</description>
	<lastBuildDate>Sat, 07 Jan 2012 19:43:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jeethoughts.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Marco Fabbri&#039;s Blog</title>
		<link>http://jeethoughts.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jeethoughts.wordpress.com/osd.xml" title="Marco Fabbri&#039;s Blog" />
	<atom:link rel='hub' href='http://jeethoughts.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Warmup dynacache with a script</title>
		<link>http://jeethoughts.wordpress.com/2012/01/07/warmup-dynacache-with-a-script/</link>
		<comments>http://jeethoughts.wordpress.com/2012/01/07/warmup-dynacache-with-a-script/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 19:39:02 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[websphere_commerce]]></category>
		<category><![CDATA[dynacache]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=192</guid>
		<description><![CDATA[Sometimes you need to quickly fill dynacache entries using a script after invalidating the whole cache contents or after a staging propagation. There are two main issues to solve in a Commerce cluster (horizontal and vertical): fill the entries in every JVM in every node using the store hostname and do it concurrently. To do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=192&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to quickly fill dynacache entries using a script after invalidating the whole cache contents or after a staging propagation.</p>
<p>There are two main issues to solve in a Commerce cluster (horizontal and vertical): fill the entries in every JVM in every node using the store hostname and do it concurrently.</p>
<p>To do this we used an Ant script recycling WCBD configuration.</p>
<p>The script called <a title="Ant script to warmup cache" href="http://www.box.com/s/ccpthjcn33tjhih166p3" target="_blank">project-warmup-dynacache.test.xml</a> is very simple.</p>
<p>First it loads the WCBD properties configuration (<a title="Ant script main properties" href="http://www.box.com/s/j5jje6p4ftsebnh8jkh1" target="_blank">project-test.properties</a> and <a title="Ant script private properties" href="http://www.box.com/s/3lltpkecdv401g3r6dev" target="_blank">project-test.private.properties</a>) with a new custom property</p>
<p>cluster.members=node1.store.com:9080,node1.store.com:9085,node2.store.com:9080,node2.store.com:9085</p>
<p>The Ant script cycle into these cluster clone hosts</p>
<p>&lt;target name=&#8221;createCategoryURLs&#8221;&gt;<br />
&lt;foreach list=&#8221;${cluster.members}&#8221;<br />
target=&#8221;warmupCategorias&#8221;<br />
param=&#8221;clone.host&#8221;<br />
trim=&#8221;true&#8221;<br />
inheritall=&#8221;true&#8221;<br />
inheritrefs=&#8221;true&#8221;&gt;<br />
&lt;/foreach&gt;<br />
&lt;/target&gt;</p>
<p>generating a file with category&#8217;s URLs using a SQL Ant task</p>
<p>&lt;target name=&#8221;warmupCategorias&#8221;&gt;<br />
&lt;sql driver=&#8221;${jdbc.driver}&#8221;<br />
url=&#8221;${jdbc.url}&#8221;<br />
userid=&#8221;${db.user.name}&#8221;<br />
password=&#8221;${db.user.password}&#8221;<br />
classpath=&#8221;${jdbc.driver.path}&#8221;<br />
output=&#8221;categoryURLList.${clone.host}.txt&#8221;<br />
print=&#8221;true&#8221;&gt;select DISTINCT &#8216;url = &#8220;http://${clone.host}/webapp/wcs/stores/servlet/Category3_10151_&#8217; || cata.catalog_id || &#8216;_&#8217;||CATESPADRE.CATGROUP_ID||&#8217;_-5_Y_image_0_____&#8221;&#8216; from catgroup catespadre, catgrprel rela, catgroup cateshija, catalog cata, store st, cattogrp catrel where CATESPADRE.CATGROUP_ID = RELA.CATGROUP_ID_PARENT and CATESHIJA.CATGROUP_ID = RELA.CATGROUP_ID_CHILD and CATA.CATALOG_ID = CATREL.CATALOG_ID and CATA.identifier = &#8216;Extended Sites Catalog Asset Store&#8217; and ST.DIRECTORY = &#8216;MadisonsESite&#8217; and CATESPADRE.MARKFORDELETE &amp;lt;&amp;gt; 1 and CATESPADRE.LASTUPDATE &amp;gt; to_timestamp (&#8217;09/12/2011&#8242;,&#8217;DD/MM/YYYY&#8217;) UNION select DISTINCT &#8216;url = &#8220;http://${clone.host}/webapp/wcs/stores/servlet/Category3_10151_&#8217; || cata.catalog_id || &#8216;_&#8217;||CATESPADRE.CATGROUP_ID||&#8217;_-5_Y_image_0___&#8217;||CATESHIJA.CATGROUP_ID||&#8217;__&#8221;&#8216; from catgroup catespadre, catgrprel rela, catgroup cateshija, catalog cata where RELA.CATALOG_ID = CATA.CATALOG_ID and CATA.identifier = &#8216;Extended Sites Catalog Asset Store&#8217; and CATESPADRE.CATGROUP_ID = RELA.CATGROUP_ID_PARENT and CATESHIJA.CATGROUP_ID = RELA.CATGROUP_ID_CHILD and CATESPADRE.MARKFORDELETE &amp;lt;&amp;gt; 1 and CATESPADRE.LASTUPDATE &amp;gt; to_timestamp (&#8217;09/12/2011&#8242;,&#8217;DD/MM/YYYY&#8217;);&lt;/sql&gt;</p>
<p>Then with an exec task, the Ant script executes a single line sh script (for <a title="Curl script to load category URLs" href="http://www.box.com/s/fzcru1voybm11t32plol" target="_blank">categories </a>and <a title="Curl script to load product URLs" href="http://www.box.com/s/t6net8e3rqsclzi71a89" target="_blank">products</a>)</p>
<p>curl &#8211;header &#8220;Host: test.store.com&#8221; &#8211;header &#8220;\$WSSP: 80&#8243; -K /opt/IBM/WC/wcbd/deploy/server/$1 -o &#8220;/opt/IBM/WC/wcbd/deploy/server/$2&#8243; &gt;/dev/null 2&gt;&amp;1</p>
<p>This curl command takes the category URLs like</p>
<p>http://node1.store.com:9080/webapp/wcs/stores/servlet/Category3_10151_11551_17510_-1_Y_image_0_____</p>
<p>changes the Host header to &#8220;test.store.com&#8221; and adds the websphere port header $WSSP (just like the plugin do).</p>
<p>Changing these http headers we solved the problem to fill cache entries for a specific JVM in a specific node using the store hostname &#8220;test.store.com&#8221;.</p>
<p>Finally we execute the curl script asynchronously using a specific sh <a title="Script to execute Ant tasks asynchronously" href="http://www.box.com/s/q1o26bogplfxoanqb3s0" target="_blank">script</a></p>
<p>&lt;exec executable=&#8221;antRunAsync.sh&#8221; failonerror=&#8221;yes&#8221;&gt;<br />
&lt;env key=&#8221;ANTRUN_NOHUP&#8221; value=&#8221;true&#8221; /&gt; &lt;!&#8211; optional &#8211;&gt;<br />
&lt;env key=&#8221;ANTRUN_OUTPUT&#8221; value=&#8221;/opt/IBM/WC/wcbd/deploy/server/categoryURLListOutput.${clone.host}.txt&#8221; /&gt; &lt;!&#8211; required &#8211;&gt;<br />
&lt;arg value=&#8221;/opt/IBM/WC/wcbd/deploy/server/getCategoriesCurl-test.sh categoryURLList.${clone.host}.txt categoryURLListOutput.${clone.host}.txt&#8221; /&gt;<br />
&lt;/exec&gt;</p>
<p>This way we can fill cache contents in every JVM at the same time.</p>
<p>To execute the script we use the WCBD directory</p>
<p>/opt/IBM/WC/wcbd/deploy/server/wcbd-ant -buildfile /opt/IBM/WC/wcbd/deploy/server/project-warmup-dynacache.test.xml</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=192&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2012/01/07/warmup-dynacache-with-a-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>
	</item>
		<item>
		<title>Activate Websphere Commerce Data Cache</title>
		<link>http://jeethoughts.wordpress.com/2011/11/01/activate-websphere-commerce-data-cache/</link>
		<comments>http://jeethoughts.wordpress.com/2011/11/01/activate-websphere-commerce-data-cache/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 16:01:43 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[DistributedMap]]></category>
		<category><![CDATA[invalidation]]></category>
		<category><![CDATA[websphere_commerce]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=177</guid>
		<description><![CDATA[Caching contents on WC is not only a cachespec.xml configuration task. Another powerful feature is to cache database query results using Websphere Commerce data cache. There are two ways to cache database query results: using cachespec.xml or configuring specified DistributedMap instances. Probably you already know how to cache those contents caching the related commands. For example [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=177&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Caching contents on WC is not only a cachespec.xml <a title="Configuring the dynamic cache service in cachespec.xml" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/concepts/cdc_config.htm" target="_blank">configuration task</a>.</p>
<p>Another powerful feature is to cache database query results using <a title="WebSphere Commerce data cache" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/tasks/tdccdccont.htm" target="_blank">Websphere Commerce data cache</a>.</p>
<p>There are two ways to cache database query results: using cachespec.xml or configuring specified DistributedMap instances.</p>
<p>Probably you already know how to cache those contents caching the related commands.</p>
<p>For example if you want to cache the catalog entry data you need to add to your cachespec this cache entry</p>
<pre>&lt;cache-entry&gt;
        &lt;class&gt;command&lt;/class&gt;
        &lt;sharing-policy&gt;not-shared&lt;/sharing-policy&gt;
        &lt;name&gt;com.ibm.commerce.catalog.objsrc.CatalogEntryCache&lt;/name&gt;
        &lt;property name="persist-to-disk"&gt;false&lt;/property&gt;
        &lt;cache-id&gt;
            &lt;component type="method" id="getFinderName"&gt;
                &lt;required&gt;true&lt;/required&gt;
            &lt;/component&gt;
            &lt;component type="method" id="getFinderArgs"&gt;
            &lt;/component&gt;
            &lt;component type="method" id="getContextInfo"&gt;
                &lt;required&gt;false&lt;/required&gt;
            &lt;/component&gt;
            &lt;priority&gt;4&lt;/priority&gt;
            &lt;timeout&gt;172800&lt;/timeout&gt;
            &lt;inactivity&gt;900&lt;/inactivity&gt;
        &lt;/cache-id&gt;
    &lt;/cache-entry&gt;</pre>
<p>simply copying it from the samples files on WCD (&lt;WCDFolder&gt;\samples\dynacache\cachespec.xml).</p>
<p>But you can also use &#8220;specified DistributedMap instances&#8221;. I put it between quotes because is not so documented on infocenter.</p>
<p>First of all what are the &#8220;specified DistributedMap instances&#8221;?</p>
<p>The default list is <a title="Logical cache names and the DistributedMaps they use by default" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/refs/rdclogcachnameDM.htm" target="_blank">here</a> but how should I activate these instances?</p>
<p>This is the tricky part: you have to create an object cache instance using WAS console (on WC 7) or adding a cacheinstances.properties file to your Stores.war\WEB-INF\classes folder (on WC 6).</p>
<p>In theory this process is documented on Commerce <a title="Enabling WebSphere Commerce data cache" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/tasks/tdcenabcommdatacache.htm" target="_blank">infocenter</a> but something on the WAS configuration part is missing.</p>
<p>Suppose you want to cache the catalog entry query results using DistributedMap and not with command caching.</p>
<p>What you have to do first is to find the default DistributedMap we are referring to.</p>
<p>Using the same example above, we <a title="WCCatalogEntryDistributedMapCache DistributedMap" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/refs/rdclogcachnameDM.htm" target="_blank">find</a> the DistributedMap associated to the com.ibm.commerce.catalog.objsrc.CatalogEntryCache command is &#8220;WCCatalogEntryDistributedMapCache&#8221;.</p>
<p>Then we create it in WAS console</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/11/createobjectcacheinstance.png"><img class="alignnone size-full wp-image-179" title="createObjectCacheInstance" src="http://jeethoughts.files.wordpress.com/2011/11/createobjectcacheinstance.png?w=500&#038;h=352" alt="create new Object Cache Instance on WAS" width="500" height="352" /></a></p>
<p>This is enough to WC to start using it to cache database query results.</p>
<p>If we ask Madisons home page and we open the Cache monitor, we already see the com.ibm.commerce.catalog.objsrc.CatalogEntryCache entries in the corresponding DistributedMap instance</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/11/usingobjectcacheinstanceoncachemonitor.png"><img class="alignnone size-large wp-image-180" title="usingObjectCacheInstanceOnCacheMonitor" src="http://jeethoughts.files.wordpress.com/2011/11/usingobjectcacheinstanceoncachemonitor.png?w=1024&#038;h=330" alt="using Object Cache Instance On Cache Monitor" width="1024" height="330" /></a></p>
<p>Now you can <a title="Additional WebSphere Commerce data cache configuration" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/concepts/cdcaddcomdatcacheconfig.htm" target="_blank">configure</a> the object instance behaviour in Commerce adding a tag to the Commerce instance file.</p>
<p>The tag is the &#8220;CrossTransactionCache&#8221; and, in our example, you can add this</p>
<pre>     &lt;CrossTransactionCache
		enabled="true"
		commandCaching="default"
		maxInactivityTime="86400"
		maxTimeToLive="172800"
		defaultResultSizeThreshold="8"
		clearUserOnLogoff="true"
		clearUserDataCacheOnLogoff="false"
		maxInvalidationIdsPerTransaction="100000"
		clearCacheOnMaxInvalidationIdsPerTransaction="false"
		reduceMemory="false"
		reduceInvalidationIds="false"&gt;
		&lt;<strong>WCCatalogEntryDistributedMapCache</strong> enabled="true" reduceMemory="false" maxTimeToLive="172800" maxInactivityTime="86400"/&gt;
	&lt;/CrossTransactionCache&gt;</pre>
<p>to refine the configuration.</p>
<p>Don&#8217;t forget the most important part: the invalidation.</p>
<p>As you saw in the cache monitor screenshot, every entry has a default TTL of 172800 seconds.</p>
<p>The best way (and the default) to invalidate these entries is to use the database triggers.</p>
<p>You can find the default database triggers on WCD samples folder (&lt;WCDFolder&gt;\schema\db2\wcs.cacheivl.trigger.sql).</p>
<p>In our example the trigger we have to apply is</p>
<pre>CREATE TRIGGER civu_c21_modified
 AFTER UPDATE ON CATENTRY
 REFERENCING NEW AS trow
 FOR EACH ROW MODE DB2SQL
  INSERT INTO cacheivl (dataid) VALUES('WCT+CATENTRY+CATENTRY_ID:%:'
  || RTRIM(CHAR(trow.CATENTRY_ID))
  )
;</pre>
<p>to create an invalidation row in CACHEIVL every time there is a modification on a specific record in the CATENTRY table.</p>
<p>I slightly modified the original &#8220;civu_c21&#8243; trigger to match one of the invalidation ids associated to our entries</p>
<pre><strong>WCT+CATENTRY+CATENTRY_ID:%:10185</strong>
WCT+CATENTRY+?
WCT+CATENTRY+CATENTRY_ID:?
WCT+?</pre>
<p>The default scheduled DynacacheInvalidationCmd will do the invalidation work for us.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=177&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2011/11/01/activate-websphere-commerce-data-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/11/createobjectcacheinstance.png" medium="image">
			<media:title type="html">createObjectCacheInstance</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/11/usingobjectcacheinstanceoncachemonitor.png?w=1024" medium="image">
			<media:title type="html">usingObjectCacheInstanceOnCacheMonitor</media:title>
		</media:content>
	</item>
		<item>
		<title>Caching static contents for a long period and update it on every deploy</title>
		<link>http://jeethoughts.wordpress.com/2011/10/26/caching-static-contents-for-a-long-period-and-update-it-on-every-deploy/</link>
		<comments>http://jeethoughts.wordpress.com/2011/10/26/caching-static-contents-for-a-long-period-and-update-it-on-every-deploy/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 14:18:27 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[websphere commerce]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=169</guid>
		<description><![CDATA[There are many ways to cache static contents in a web site. Without playing with cache headers, you can use different techniques to change file name to be sure the browser is renewing his local cache. El Pais for example use the querystring to do the trick http://www.elpais.com/js/util_nuevo.js?update=201104251641 I prefer to change the file name [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=169&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are many ways to cache static contents in a web site. Without playing with cache headers, you can use different techniques to change file name to be sure the browser is renewing his local cache.</p>
<p>El Pais for example use the querystring to do the trick</p>
<p>http://www.elpais.com/js/util_nuevo.js?update=201104251641</p>
<p>I prefer to change the file name</p>
<p>http://www.sears.ca/stores/combined.js.h355855108.pack</p>
<p>because there are a lot of <a title="Is it the filename or the whole URL used as a key in browser caches?" href="//stackoverflow.com/questions/83990/is-it-the-filename-or-the-whole-url-used-as-a-key-in-browser-caches" target="_blank">different opinions</a> about if all browsers consider querystring part of the URL.</p>
<p>Again there are a lot of different ways to change the filename in a page.</p>
<p>I like to change it in the build process to completely decouple the renaming process with the development and deployment process.</p>
<p>Usually you are working in a development environment using a code repository and a build server.</p>
<p>To generate javascript versioned filenames, you just have to slightly modify the checkout process adding an Ant task like this</p>
<p>&lt;replaceregexp match=&#8221;javascript/([a-zA-Z0-9]+)\.js&#8221; replace=&#8221;javascript/\1.v${env.BUILD_NUMBER}.js&#8221; flags=&#8221;g&#8221;&gt;<br />
&lt;fileset dir=&#8221;${source.dir}/${cvs.package}&#8221; includes=&#8221;**/*.jsp, **/*.jspf&#8221;/&gt;<br />
&lt;/replaceregexp&gt;</p>
<p>This way when you checkout your application code from CVS for example, you can use the BUILD_NUMBER environment variable (Jenkins has this variable <a title="Jenkins Set Environment Variables" href="https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables" target="_blank">available</a> for script for example) to generate a link like this</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;c:out value=&#8217;${storeImgDirHostname}javascript/MessageHelper.<strong>v3344</strong>.js&#8217;/&gt;&#8221;&gt;&lt;/script&gt;</p>
<p>from the original one</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;c:out value=&#8217;${storeImgDirHostname}javascript/MessageHelper.js&#8217;/&gt;&#8221;&gt;&lt;/script&gt;</p>
<p>using the very efficient replaceregexp Ant task.</p>
<p>Now you have changed all the javascript links in your JSPs, you only have to cheat the browser to always load the same javascript filename in the HTTP filesystem.</p>
<p>You can do this with a simple rewrite rule like</p>
<p>RewriteRule ^/wcsstore/(.*)\.v(.*)\.js$ /wcsstore/$1.js</p>
<p>This way anytime a user will ask the versioned javascript file link</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;hostname&gt;/javascript/MessageHelper.v3344.js&#8221;&gt;&lt;/script&gt;</p>
<p>the HTTP server will return the file without versioning</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&lt;hostname&gt;/javascript/MessageHelper.js&#8221;&gt;&lt;/script&gt;</p>
<p>But with an important difference: reloading the file from the http server with use the cached version.</p>
<p>This strategy allows also to keep the same filename from the developer workstation to the production http server.</p>
<p>Last step is to add the expires rule to cache javascript contents for a year for example</p>
<p>ExpiresByType text/javascript &#8220;access plus 1 year&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=169&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2011/10/26/caching-static-contents-for-a-long-period-and-update-it-on-every-deploy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>
	</item>
		<item>
		<title>Caching Madisons home page with ESI using a rewrite rule to allow SEO</title>
		<link>http://jeethoughts.wordpress.com/2011/10/22/caching-madisons-home-page-with-esi-using-a-rewrite-rule-to-allow-seo/</link>
		<comments>http://jeethoughts.wordpress.com/2011/10/22/caching-madisons-home-page-with-esi-using-a-rewrite-rule-to-allow-seo/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 08:55:23 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[commerce]]></category>
		<category><![CDATA[ESI]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=162</guid>
		<description><![CDATA[There is a clean way to keep using SEO URLs (static version) and allow caching at IHS level. The infocenter says: &#8220;Static URLs can only use WebSphere dynamic caching at the Application Server.&#8221; Then, in theory, you can&#8217;t cache at IHS level a static URL like http://localhost/webapp/wcs/stores/servlet/TopCategories1_10001_10001 Buy if you &#8220;rewrite&#8221; this URL to his [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=162&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is a clean way to keep using SEO URLs (static version) and allow caching at IHS level.</p>
<p>The <a title="Search engine optimization (SEO) for WebSphere Commerce Version 7 Feature Pack 2 or earlier" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.seositemap.doc/concepts/csdsearchopt.htm" target="_blank">infocenter</a> says:</p>
<p>&#8220;Static URLs can only use WebSphere dynamic caching at the Application Server.&#8221;</p>
<p>Then, in theory, you can&#8217;t cache at IHS level a static URL like</p>
<p><a href="http://localhost/webapp/wcs/stores/servlet/TopCategories_10001_10001">http://localhost/webapp/wcs/stores/servlet/TopCategories1_10001_10001</a></p>
<p>Buy if you &#8220;rewrite&#8221; this URL to his dynamic version</p>
<p><a href="http://localhost/webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=10001&amp;catalogId=10001">http://localhost/webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=10001&amp;catalogId=10001</a></p>
<p>BEFORE it&#8217;s processed by the plugin, you can still cache it with ESI.</p>
<p>This is what I did: I added this simple rewrite rule to the Commerce virtual host on IHS</p>
<p>RewriteRule ^/webapp/wcs/stores/servlet/TopCategories1_(.+)_(.+)$ /webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=$1&amp;catalogId=$2 [PT]</p>
<p>and voilá. This way I&#8217;m still using the SEO URLs but I&#8217;m caching it on ESI.</p>
<p>Be carefully: the PT (Pass Through) option in the rule is VERY important.</p>
<p>According to the Websphere plugin <a title="Using the WebSphere plug-in with mod_alias and mod_rewrite" href="http://publib.boulder.ibm.com/httpserv/ihsdiag/plugin_alter_uri.html" target="_blank">documentation</a>:</p>
<p>&#8220;The <em>PT</em> flag is required, as this is what lets the WebSphere plug-in observe the results of the mod_rewrite processing.&#8221;</p>
<p>this option allows you to &#8220;cheat&#8221; the plugin and cache the home page contents on the edge.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=162&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2011/10/22/caching-madisons-home-page-with-esi-using-a-rewrite-rule-to-allow-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>
	</item>
		<item>
		<title>Caching Madisons home page with ESI</title>
		<link>http://jeethoughts.wordpress.com/2011/08/20/caching-madisons-home-page-with-esi/</link>
		<comments>http://jeethoughts.wordpress.com/2011/08/20/caching-madisons-home-page-with-esi/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 18:54:21 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[cache]]></category>
		<category><![CDATA[was]]></category>
		<category><![CDATA[websphere commerce]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=118</guid>
		<description><![CDATA[Apparently to cache Madisons home page using ESI at http level is a simple task. But the instructions to follow are quite complicated to line up in a step&#8217;s sequence. I try to resume what you have to do to get it working in WCD 7 environment. 1. Install and configure IHS on your workstation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=118&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Apparently to cache Madisons home page using ESI at http level is a simple task.</p>
<p>But the instructions to follow are quite complicated to line up in a step&#8217;s sequence.</p>
<p>I try to resume what you have to do to get it working in WCD 7 environment.</p>
<p>1. Install and configure IHS on your workstation</p>
<p>Deluca explains how to do in this <a title="Configuring the IBM HTTP Server to work with WebSphere Commerce Developer" href="http://www.ibm.com/developerworks/websphere/tutorials/0903_deluca/section8.html" target="_blank">article</a>. I suggest to install the last FP (now 17) for IHS, Plugin and JDK.</p>
<p>2. Install <a title="Installing the ESI cache monitor" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.admin.doc/tutorial/tdcperf1c.htm" target="_blank">DynacacheESI</a> and Dynacache Monitor applications</p>
<p>It&#8217;s better to install the applications on top of WAS 7.0.0.17 and update the Cache monitor to the <a title="IBM Extended Cache Monitor for IBM WebSphere Application Server technology preview" href="http://www.ibm.com/developerworks/websphere/downloads/cache_monitor.html" target="_blank">Extended version</a>.</p>
<p>3. <a title="Configuring Edge Side Include caching" href="http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.express.doc/info/exp/ae/tdyn_esiedgecaching.html" target="_blank">Configure ESI</a> on IHS Plugin</p>
<pre>&lt;Property Name="ESIEnable" Value="true"/&gt;
&lt;Property Name="ESIMaxCacheSize" Value="1024"/&gt;
&lt;Property Name="ESIInvalidationMonitor" Value="true"/&gt;</pre>
<p>4. Configure IHS process to work with ESI</p>
<p>On windows there is no problem to leave default values but on Linux you have to remember to limit the number of processes (<a title="Tuning IBM HTTP Server to maximize the number of client connections to WebSphere Application Server" href="http://www-01.ibm.com/support/docview.wss?uid=swg21167658" target="_blank">only one is better for ESI</a>)</p>
<p>5. Enable Servlet Caching and verify Cache External groups members on WAS console</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wasenableservletcaching.png"><img class="alignnone size-full wp-image-123" title="WAS Enable Servlet Caching" src="http://jeethoughts.files.wordpress.com/2011/08/wasenableservletcaching.png?w=500&#038;h=227" alt="" width="500" height="227" /></a></p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wasexternalcachegroupmembers.png"><img class="alignnone size-full wp-image-124" title="WAS External Cache Group Members" src="http://jeethoughts.files.wordpress.com/2011/08/wasexternalcachegroupmembers.png?w=500&#038;h=179" alt="" width="500" height="179" /></a></p>
<p>This last configuration is very important in a cluster environment where you must have one entry for every remote http server.</p>
<p>5. Modify cachespec.xml</p>
<pre>&lt;cache-entry&gt;
        &lt;class&gt;servlet&lt;/class&gt;
	&lt;name&gt;com.ibm.commerce.struts.ECActionServlet.class&lt;/name&gt;
        &lt;property name="consume-subfragments"&gt;true&lt;/property&gt;
        <strong>&lt;property name="EdgeCacheable"&gt;true&lt;/property&gt;</strong>
        &lt;property name="save-attributes"&gt;false&lt;/property&gt;
        &lt;!-- TopCategoriesDisplay?storeId=&lt;storeId&gt;&amp;catalogId=&lt;catalogId&gt; --&gt;
        &lt;cache-id&gt;
                &lt;component id="" type="pathinfo"&gt;
                        &lt;required&gt;true&lt;/required&gt;
			&lt;value&gt;/TopCategoriesDisplay&lt;/value&gt;
                &lt;/component&gt;
                &lt;component id="storeId" type="parameter"&gt;
                        &lt;required&gt;true&lt;/required&gt;
                        &lt;/component&gt;
                &lt;component id="catalogId" type="parameter"&gt;
                        &lt;required&gt;true&lt;/required&gt;
                &lt;/component&gt;
        &lt;/cache-id&gt;
&lt;cache-entry&gt;</pre>
<p>Until here the setup was quite easy.</p>
<p>Let&#8217;s check the results on Cache Monitor using the TopCategories dynamic URL.</p>
<p>This is the initial state on cache monitor</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitorcachestatisticsempty.png"><img class="alignnone size-full wp-image-126" title="WAS Cache Monitor Cache Statistics Empty" src="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitorcachestatisticsempty.png?w=500&#038;h=191" alt="" width="500" height="191" /></a></p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticsempty.png"><img class="alignnone size-full wp-image-127" title="WAS Cache Monitor Edge Statistics Empty" src="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticsempty.png?w=500&#038;h=214" alt="" width="500" height="214" /></a></p>
<p>There is no entries on dynacache or ESI.</p>
<p>Calling this URL</p>
<p><a href="http://localhost/webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=10001&amp;catalogId=10001">http://localhost/webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=10001&amp;catalogId=10001</a></p>
<p>the page contents are cached on IHS</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticspagecached.png"><img class="alignnone size-full wp-image-129" title="WAS CacheMonitorEdgeStatisticsPageCached" src="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticspagecached.png?w=500&#038;h=214" alt="" width="500" height="214" /></a></p>
<p>and the page is cached at WAS level</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitorcachestatisticspagecached.png"><img class="alignnone size-large wp-image-130" title="WAS Cache Monitor Cache Statistics Page Cached" src="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitorcachestatisticspagecached.png?w=1024&#038;h=293" alt="" width="1024" height="293" /></a></p>
<p>Now hitting F5 to reload the page, the request will come directly from the IHS without generating traffic against WAS (look at the cache entry hit)</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticspagecachedhit.png"><img class="alignnone size-full wp-image-132" title="WAS Cache Monitor Edge Statistics Page Cached Hit" src="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticspagecachedhit.png?w=500&#038;h=213" alt="" width="500" height="213" /></a></p>
<p>Done. We are caching pages at IHS level using ESI.</p>
<p>But&#8230;</p>
<p>This is working only for dynamic URLs not for the static ones</p>
<p><a title="Search engine optimization (SEO) for WebSphere Commerce Version 7 Feature Pack 2 or earlier" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.seositemap.doc/concepts/csdsearchopt.htm" target="_blank">Search engine optimization (SEO) for WebSphere Commerce Version 7 Feature Pack 2 or earlier</a></p>
<p>&#8220;Static URLs can only use WebSphere dynamic caching at the Application Server&#8221;</p>
<p>This means that the corrispondent SEO static URL for Madisons Home Page (OOB in version 7)</p>
<p><a href="http://localhost/webapp/wcs/stores/servlet/TopCategories_10001_10001">http://localhost/webapp/wcs/stores/servlet/TopCategories_10001_10001</a></p>
<p>CANNOT be cached with ESI at IHS level. And no, this is not solved on FEP 3 :-)</p>
<p>Remember also that</p>
<p><a title="IBM HTTP Server Performance Tuning" href="http://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.html" target="_blank">IBM HTTP Server Performance Tuning</a></p>
<p>&#8220;Each child processes uses 1 ESI Invalidation thread (when the feature is configured), and this thread is used synchronously in the web container.&#8221;</p>
<p>And you will find this error</p>
<pre>[8/20/11 20:47:19:205 CEST] 00000015 ThreadMonitor W   WSVR0605W: Thread "WebContainer : 4" (00000068) has been active for 652414 milliseconds and may be hung.  There is/are 1 thread(s) in total in the server that may be hung.
	at java.lang.Object.wait(Native Method)</pre>
<p>on WAS SystemOut for every webcontainer thread connected with ESI invalidation servlet when is not used for a while.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=118&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2011/08/20/caching-madisons-home-page-with-esi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wasenableservletcaching.png" medium="image">
			<media:title type="html">WAS Enable Servlet Caching</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wasexternalcachegroupmembers.png" medium="image">
			<media:title type="html">WAS External Cache Group Members</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitorcachestatisticsempty.png" medium="image">
			<media:title type="html">WAS Cache Monitor Cache Statistics Empty</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticsempty.png" medium="image">
			<media:title type="html">WAS Cache Monitor Edge Statistics Empty</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticspagecached.png" medium="image">
			<media:title type="html">WAS CacheMonitorEdgeStatisticsPageCached</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitorcachestatisticspagecached.png?w=1024" medium="image">
			<media:title type="html">WAS Cache Monitor Cache Statistics Page Cached</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/wascachemonitoredgestatisticspagecachedhit.png" medium="image">
			<media:title type="html">WAS Cache Monitor Edge Statistics Page Cached Hit</media:title>
		</media:content>
	</item>
		<item>
		<title>wcf:getData tag demystified</title>
		<link>http://jeethoughts.wordpress.com/2011/08/11/wcfgetdata-tag-demystified/</link>
		<comments>http://jeethoughts.wordpress.com/2011/08/11/wcfgetdata-tag-demystified/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 11:11:14 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=113</guid>
		<description><![CDATA[Commerce BOD interface is a powerful tool if you know how to use it. Using wcf:getData tag is an easy way to exploit the power of BOD. Madisons uses it on category and product pages. On the product page,  &#60;WCDE_Home&#62;\workspace\Stores\WebContent\Madisons\Snippets\Catalog\CatalogEntryDisplay\CachedProductOnlyDisplay.jspfor example &#60;wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogEntryType[]" var="catalogEntriesForAttributes" expressionBuilder="getCatalogEntryByParentCatalogEntryId" varShowVerb="showVerb"&#62; &#60;wcf:contextData name="storeId" data="${param.storeId}"/&#62; &#60;wcf:param name="catEntryId" value="${product.productID}"/&#62; &#60;wcf:param name="dataLanguageIds" value="${WCParam.langId}"/&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=113&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="BOD Commerce Framework" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.soa.doc/concepts/csdsoaprogmodel.htm" target="_blank">Commerce BOD interface</a> is a powerful tool if you know how to use it.</p>
<p>Using wcf:getData tag is an easy way to exploit the power of BOD.</p>
<p>Madisons uses it on category and product pages. On the product page,  &lt;WCDE_Home&gt;\workspace\Stores\WebContent\Madisons\Snippets\Catalog\CatalogEntryDisplay\CachedProductOnlyDisplay.jspfor example</p>
<pre>&lt;wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogEntryType[]" var="catalogEntriesForAttributes" expressionBuilder="getCatalogEntryByParentCatalogEntryId" varShowVerb="showVerb"&gt;
&lt;wcf:contextData name="storeId" data="${param.storeId}"/&gt;
&lt;wcf:param name="catEntryId" value="${product.productID}"/&gt;
&lt;wcf:param name="dataLanguageIds" value="${WCParam.langId}"/&gt;
&lt;wcf:param name="accessProfile" value="IBM_Store_CatalogEntryAttributes"/&gt;
&lt;/wcf:getData&gt;</pre>
<p>we are using it to get the attribute&#8217;s list for a product.</p>
<p>But wcf:getdata tag can do a lot more.</p>
<p>Suppose I want to put in a variable in my JSP all the products that are beyond a specific category using wcf:getdata.</p>
<p>First of all I have to look for in WC Infocenter if IBM already implemented this query for me.</p>
<p>The table on <a title="CatalogEntry services" href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Catalog/CatalogEntry/noun.htm" target="_blank">Noun CatalogEntry</a> help us to find the values I have to put on wcf:getdata attributes to get such a resultset.</p>
<p>In the table I find what I was looking for: &#8220;Get child catalog entries of a catalog group&#8221;.</p>
<p>I write down the fields I need:</p>
<ul>
<li>Expression Builder = getCatalogEntryByParentCatalogGroupId</li>
<li>Corrispondent XPath = /CatalogEntry[ParentCatalogGroupIdentifier[(UniqueID=$uniqueId$)]]</li>
<li>Access profile = &#8220;All access profiles listed in the &#8216;Access Profile&#8217; section can be applied to this expression&#8221;</li>
</ul>
<p>As access profile I choose &#8220;IBM_Admin_Summary&#8221; (at the bottom of the table).</p>
<p>To know which are the contextData, I check the xml Request example</p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Catalog/CatalogEntry/getCatalogEntriesForParentCatalogGroup_req.xml">http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.services.doc/Catalog/CatalogEntry/getCatalogEntriesForParentCatalogGroup_req.xml</a></p>
<p>Now compose the corrispondent wcf:getdata tag is very easy.</p>
<p>I found the Expression Builder on the table (&#8220;getCatalogEntryByParentCatalogGroupId&#8221;), the contextData on the xml request example (storeId and catalogId), the parameter on the XPath expression (the catalog group id) and the access profile I choosed (&#8220;IBM_Admin_Summary&#8221;)</p>
<pre>&lt;wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogEntryType[]" var="catalogEntriesInCategory" expressionBuilder="getCatalogEntryByParentCatalogGroupId" varShowVerb="showVerb"&gt;
	&lt;wcf:contextData name="storeId" data="${param.storeId}"/&gt;
	&lt;wcf:contextData name="catalogId" data="${param.catalogId}"/&gt;
	&lt;wcf:param name="catGroupId" value="${WCParam.categoryId}"/&gt;
	&lt;wcf:param name="accessProfile" value="IBM_Admin_Summary"/&gt;
&lt;/wcf:getData&gt;</pre>
<p>Before putting this tag in a JSP, I can test what is returning using the <a title="Query Template File Syntax Validator" href="http://localhost//webapp/wcs/admin/servlet/dsl.jsp" target="_blank">Query Template File Syntax Validator</a> included on WCDE</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/qtfsv_wcde_1.png"><img class="alignnone size-full wp-image-115" title=" Query Template File Syntax Validator" src="http://jeethoughts.files.wordpress.com/2011/08/qtfsv_wcde_1.png?w=500&#038;h=400" alt="" width="500" height="400" /></a></p>
<p>If you use &#8220;10004&#8243; as category group id (&#8220;Lounge Chairs&#8221; on Madisons) and submit the query</p>
<p><a href="http://jeethoughts.files.wordpress.com/2011/08/qtfsv_wcde_2.png"><img class="alignnone size-large wp-image-116" title="XPath query results" src="http://jeethoughts.files.wordpress.com/2011/08/qtfsv_wcde_2.png?w=1024&#038;h=482" alt="" width="1024" height="482" /></a></p>
<p>you&#8217;ll see the 4 products included on &#8220;Lounge Chairs&#8221; category and the queries executed by BOD under the covers.</p>
<p>Unfortunately the default dsl.jsp is only an example and it needs a little customization to add the catalogId parameter.</p>
<p>You can find the working version on my Box.net <a title="New dsl.jsp version" href="http://www.box.net/shared/lvunoticv904viafeoqz" target="_blank">space</a>. Enjoy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=113&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2011/08/11/wcfgetdata-tag-demystified/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/qtfsv_wcde_1.png" medium="image">
			<media:title type="html"> Query Template File Syntax Validator</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/08/qtfsv_wcde_2.png?w=1024" medium="image">
			<media:title type="html">XPath query results</media:title>
		</media:content>
	</item>
		<item>
		<title>Websphere Commerce Build and Deploy and Hudson integration &#8211; Versioning System Checkout</title>
		<link>http://jeethoughts.wordpress.com/2011/05/08/websphere-commerce-build-and-deploy-and-hudson-integration-versioning-system-checkout/</link>
		<comments>http://jeethoughts.wordpress.com/2011/05/08/websphere-commerce-build-and-deploy-and-hudson-integration-versioning-system-checkout/#comments</comments>
		<pubDate>Sun, 08 May 2011 12:20:11 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[CVS]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[WC]]></category>
		<category><![CDATA[WCBD]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=105</guid>
		<description><![CDATA[Using Hudson as continuous integration server allows you to checkout source code directly without using WCBD to do this. The configuration is quite simple. First you create a job to execute WCBD script and then you configure &#8220;Source Code Management&#8221; section this way Every time you&#8217;ll execute this job, Hudson will checkout WC source code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=105&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Using Hudson as continuous integration server allows you to checkout source code directly without using WCBD to do this.</p>
<p>The configuration is quite simple.</p>
<p>First you create a job to execute WCBD script and then you configure &#8220;Source Code Management&#8221; section this way</p>
<div id="attachment_108" class="wp-caption alignnone" style="width: 1034px"><a href="http://jeethoughts.files.wordpress.com/2011/05/hudsonjobconfigurationCVS.png"><img class="size-large wp-image-108" title="HudsonJobConfiguration" src="http://jeethoughts.files.wordpress.com/2011/05/hudsonjobconfiguration1.png?w=1024&#038;h=373" alt="" width="1024" height="373" /></a><p class="wp-caption-text">HudsonJobConfigurationCVS</p></div>
<p>Every time you&#8217;ll execute this job, Hudson will checkout WC source code (using &#8220;update&#8221; option) in the Hudson workspace located on (default location)</p>
<p>/var/lib/hudson/jobs/&lt;HudsonJobName&gt;/workspace</p>
<p>Then you have to add a new property on build.properties file, I called &#8220;hudson.home&#8221;, to point to Hudson home directory</p>
<pre>#===============================================================================
# CUSTOMIZATION: Add new properties required by customization below.
#===============================================================================
#-------------------------------------------------------------------------------
# hudson.home
#
# Home directory Hudson.
#-------------------------------------------------------------------------------
hudson.home=/var/lib/hudson</pre>
<p>Last change you have to do is to modify</p>
<p>/opt/IBM/WebSphereCommerce70/wcbd/extract/extract-cvs.xml</p>
<p>this way</p>
<p>&lt;target name=&#8221;all&#8221;&gt;<br />
&lt;copy todir=&#8221;${source.dir}/${cvs.package}&#8221;&gt;<br />
&lt;fileset dir=&#8221;${hudson.home}/jobs/${job.name}/${cvs.package}&#8221;/&gt;<br />
&lt;/copy&gt;</p>
<p>to get updated source code from Hudson workspace instead of checkout it directly from the repository.<br />
Executing the command</p>
<p>/opt/IBM/WebSphereCommerce70/wcbd/wcbd-ant -buildfile /opt/IBM/WebSphereCommerce70/wcbd/wcbd-build.xml</p>
<p>Hudson will checkout the code and WCBD will create the zip to deploy as usual</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=105&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2011/05/08/websphere-commerce-build-and-deploy-and-hudson-integration-versioning-system-checkout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2011/05/hudsonjobconfiguration1.png?w=1024" medium="image">
			<media:title type="html">HudsonJobConfiguration</media:title>
		</media:content>
	</item>
		<item>
		<title>Websphere Commerce outbound messages: how to use WAS default messaging provider to test them</title>
		<link>http://jeethoughts.wordpress.com/2010/08/27/websphere-commerce-outbound-messages-test-with-sib/</link>
		<comments>http://jeethoughts.wordpress.com/2010/08/27/websphere-commerce-outbound-messages-test-with-sib/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 10:00:42 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[default_messaging_engine]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[outbound]]></category>
		<category><![CDATA[sib]]></category>
		<category><![CDATA[websphere_commerce]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=80</guid>
		<description><![CDATA[Establish an asynchronous communication between Commerce and a back-end system is mandatory in many integration projects. And asynchronous messages means MQ in the Commerce world. But test this integration can be complicated if you are a developer and you need to install MQ in every WCD workstation. There&#8217;s a solution: use SIB (Service Integration Bus), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=80&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Establish an asynchronous communication between Commerce and a back-end system is mandatory in many integration projects. And asynchronous messages means MQ in the Commerce world.</p>
<p>But test this integration can be complicated if you are a developer and you need to install MQ in every WCD workstation.</p>
<p>There&#8217;s a solution: use SIB (Service Integration Bus), the WAS default messaging provider.</p>
<p>Creating a bus in the SIB and then the connection factory and the queues, you can test an outbound message like <a href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=/com.ibm.commerce.integration.doc/refs/rcvxmlrn.htm" target="_blank">Report_NC_PurchaseOrder</a> sent when you close an order. Remember to <a href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=/com.ibm.commerce.integration.doc/tasks/tcvenord.htm" target="_blank">enable it</a> updating CMDREG table.</p>
<p>Let&#8217;s see the SIB configuration.</p>
<p>First you create a bus called &#8220;sibWC&#8221; and add &#8220;server1&#8243; default application server as a member</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/sibwcmember.png"><img class="alignnone size-medium wp-image-88" title="server1 as member of bus" src="http://jeethoughts.files.wordpress.com/2010/08/sibwcmember.png?w=300&#038;h=100" alt="" width="300" height="100" /></a></p>
<p>Remember to activate two services on server1: sib service and <a href="http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/index.jsp?topic=/com.ibm.commerce.integration.doc/tasks/tcvconfigure_was_for_mq.htm" target="_blank">ActivitySession service</a>.</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/wcserver1sibservice.png"><img class="alignnone size-medium wp-image-89" title="sib service on server1 application server" src="http://jeethoughts.files.wordpress.com/2010/08/wcserver1sibservice.png?w=300&#038;h=257" alt="" width="300" height="257" /></a></p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/wcserver1activitysessionservice.png"><img class="alignnone size-medium wp-image-90" title="ActivitySession service on server1" src="http://jeethoughts.files.wordpress.com/2010/08/wcserver1activitysessionservice.png?w=300&#038;h=207" alt="" width="300" height="207" /></a></p>
<p>Then you have to create the queue connection factory and the queues.</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory1.png"><img class="alignnone size-medium wp-image-91" title="Queue Connection Factory creation" src="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory1.png?w=300&#038;h=139" alt="" width="300" height="139" /></a></p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory22.png"><img class="alignnone size-medium wp-image-95" title="Queue Connection Factory creation" src="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory22.png?w=242&#038;h=300" alt="" width="242" height="300" /></a></p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory31.png"><img class="alignnone size-medium wp-image-96" title="Queue Connection Factory creation" src="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory31.png?w=300&#038;h=297" alt="" width="300" height="297" /></a></p>
<p>And the queues</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/sibqueues.png"><img class="alignnone size-medium wp-image-97" title="sib commerce default queues" src="http://jeethoughts.files.wordpress.com/2010/08/sibqueues.png?w=300&#038;h=180" alt="" width="300" height="180" /></a></p>
<p>The messaging infrastructure is ready. Let&#8217;s configure the Commerce side.</p>
<p>We activate &#8220;Websphere MQ&#8221; transport using Administration console at SITE level</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportsitelevel.png"><img class="alignnone size-medium wp-image-98" title="WC Admin Console Transport Site Level" src="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportsitelevel.png?w=300&#038;h=74" alt="" width="300" height="74" /></a></p>
<p>and then create the message types at STORE level (Madisons in this case)</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstorelevel.png"><img class="alignnone size-medium wp-image-99" title="WC Admin Console Transport Store Level" src="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstorelevel.png?w=300&#038;h=86" alt="" width="300" height="86" /></a></p>
<div id="attachment_100" class="wp-caption alignnone" style="width: 310px"><a href="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstoreleveldetails1.png"><img class="size-medium wp-image-100" title="WC Admin Console Transport Store Level Detail" src="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstoreleveldetails1.png?w=300&#038;h=197" alt="" width="300" height="197" /></a><p class="wp-caption-text">WC Admin Console Transport Store Level Detail</p></div>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstoreleveldetails2.png"><img class="alignnone size-medium wp-image-101" title="WC Admin Console Transport Store Level Detail" src="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstoreleveldetails2.png?w=300&#038;h=184" alt="" width="300" height="184" /></a></p>
<p>Ready to play!!</p>
<p>Now when you&#8217;ll close an order, a JMS message with the Report_NC_PurchaseOrder xml will be sent to the JMSOutboundQueue queue in the sibWC bus.</p>
<p>Going to the sibWC messaging engine, you&#8217;ll find the message</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/orderoutboundmessagesib.png"><img class="alignnone size-medium wp-image-102" title="Report_NC_PurchaseOrder xml message in messaging engine" src="http://jeethoughts.files.wordpress.com/2010/08/orderoutboundmessagesib.png?w=300&#038;h=150" alt="" width="300" height="150" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=80&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2010/08/27/websphere-commerce-outbound-messages-test-with-sib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/sibwcmember.png?w=300" medium="image">
			<media:title type="html">server1 as member of bus</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcserver1sibservice.png?w=300" medium="image">
			<media:title type="html">sib service on server1 application server</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcserver1activitysessionservice.png?w=300" medium="image">
			<media:title type="html">ActivitySession service on server1</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory1.png?w=300" medium="image">
			<media:title type="html">Queue Connection Factory creation</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory22.png?w=242" medium="image">
			<media:title type="html">Queue Connection Factory creation</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/queueconnectionfactory31.png?w=300" medium="image">
			<media:title type="html">Queue Connection Factory creation</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/sibqueues.png?w=300" medium="image">
			<media:title type="html">sib commerce default queues</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportsitelevel.png?w=300" medium="image">
			<media:title type="html">WC Admin Console Transport Site Level</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstorelevel.png?w=300" medium="image">
			<media:title type="html">WC Admin Console Transport Store Level</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstoreleveldetails1.png?w=300" medium="image">
			<media:title type="html">WC Admin Console Transport Store Level Detail</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcadminconsoletransportstoreleveldetails2.png?w=300" medium="image">
			<media:title type="html">WC Admin Console Transport Store Level Detail</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/orderoutboundmessagesib.png?w=300" medium="image">
			<media:title type="html">Report_NC_PurchaseOrder xml message in messaging engine</media:title>
		</media:content>
	</item>
		<item>
		<title>Websphere Commerce Developer 7 error activating transports</title>
		<link>http://jeethoughts.wordpress.com/2010/08/27/websphere-commerce-developer-7-error-activating-transports/</link>
		<comments>http://jeethoughts.wordpress.com/2010/08/27/websphere-commerce-developer-7-error-activating-transports/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 07:25:41 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[websphere_commerce]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=78</guid>
		<description><![CDATA[Using Administration Console you can activate the default Commerce transports like email or file to send a email notification for a closed order for example. But activate a transport can trigger a publish operation for the Commerce Test Server. This publish can generate this error using an outbound message: &#8220;[8/24/10 16:31:36:078 CEST] 00000050 CommerceSrvr E [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=78&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Using Administration Console you can activate the default Commerce transports like email or file to send a email notification for a closed order for example.<br />
But activate a transport can trigger a publish operation for the Commerce Test Server.<br />
This publish can generate this error using an outbound message:</p>
<p>&#8220;[8/24/10 16:31:36:078 CEST] 00000050 CommerceSrvr  E JMSMessageBean sendImmediate CMN0422E: The following naming exception has occurred during processing: &#8220;lookup(eis/JCAFile)javax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: eis/JCAFile: First component in name JCAFile not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound:IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]&#8220;</p>
<p>To solve this issue you have to remove and add WC application.</p>
<p>[org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 in Toolkit]</p>
<p><a href="http://www-01.ibm.com/support/docview.wss?uid=swg21298876" target="_blank">http://www-01.ibm.com/support/docview.wss?uid=swg21298876</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=78&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2010/08/27/websphere-commerce-developer-7-error-activating-transports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>
	</item>
		<item>
		<title>Websphere Commerce Developer server startup time lower than 90 seconds</title>
		<link>http://jeethoughts.wordpress.com/2010/08/18/websphere-commerce-developer-server-startup-time-lower-than-90-seconds/</link>
		<comments>http://jeethoughts.wordpress.com/2010/08/18/websphere-commerce-developer-server-startup-time-lower-than-90-seconds/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 10:00:11 +0000</pubDate>
		<dc:creator>Marco Fabbri</dc:creator>
				<category><![CDATA[websphere commerce]]></category>
		<category><![CDATA[commerce]]></category>
		<category><![CDATA[commerce_developer]]></category>
		<category><![CDATA[derby]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://jeethoughts.wordpress.com/?p=74</guid>
		<description><![CDATA[All Commerce developers has complained at least one time about Commerce Server startup time. But if you&#8217;re using WCD 7 and Derby (many developers doesn&#8217;t need to connect to a real database because they just need to change JSPs), there is a solution. You just need to apply these simple tips. 1) Defragment your HD. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=74&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>All Commerce developers has complained at least one time about Commerce Server startup time.</p>
<p>But if you&#8217;re using WCD 7 and Derby (many developers doesn&#8217;t need to connect to a real database because they just need to change JSPs), there is a solution.</p>
<p>You just need to apply these simple tips.</p>
<p>1) Defragment your HD. Derby is a filesystem based database and it VERY affected from a fragmented disk.</p>
<p>2) Change the WAS heap default settings. The server1 heap size has to be between 512 and 1024 MB (remember you need at least 3 GB RAM to work)</p>
<p><a href="http://jeethoughts.files.wordpress.com/2010/08/wcd7heapsettings.png"><img class="alignnone size-medium wp-image-75" title="WCD7 Heap Settings" src="http://jeethoughts.files.wordpress.com/2010/08/wcd7heapsettings.png?w=246&#038;h=300" alt="WCD7 Heap Settings" width="246" height="300" /></a></p>
<p>3) Add two lines to Derby setup file to tune it.</p>
<p>Just add these two properties to the file C:\IBM\SDP\runtimes\base_v7\derby\derby.properties</p>
<div>derby.storage.pageCacheSize=10000</div>
<div>derby.storage.pageSize=8192</div>
<div>Restart Commerce Server and let&#8217;s verify the difference.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeethoughts.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeethoughts.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeethoughts.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeethoughts.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeethoughts.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeethoughts.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeethoughts.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeethoughts.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeethoughts.wordpress.com&amp;blog=5380213&amp;post=74&amp;subd=jeethoughts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeethoughts.wordpress.com/2010/08/18/websphere-commerce-developer-server-startup-time-lower-than-90-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28eda10ea7469dc88cb0cc8d3613adcd?s=96&#38;d=retro&#38;r=G" medium="image">
			<media:title type="html">mfabbri</media:title>
		</media:content>

		<media:content url="http://jeethoughts.files.wordpress.com/2010/08/wcd7heapsettings.png?w=246" medium="image">
			<media:title type="html">WCD7 Heap Settings</media:title>
		</media:content>
	</item>
	</channel>
</rss>
