<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for ~pperalta</title>
	<atom:link href="http://blackbeanbag.net/wp/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blackbeanbag.net/wp</link>
	<description>Thoughts on software development and other stuff</description>
	<lastBuildDate>Fri, 26 Aug 2011 20:33:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Partitions, Backing Maps, and Services&#8230;Oh My! by justi myatt</title>
		<link>http://blackbeanbag.net/wp/2010/07/01/partitions-backing-maps-and-services-oh-my/comment-page-1/#comment-4275</link>
		<dc:creator>justi myatt</dc:creator>
		<pubDate>Fri, 26 Aug 2011 20:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=454#comment-4275</guid>
		<description>Hi,

Loved the article, especially the diagrams, a picture 1000 words...

I&#039;m trying to track down a copy of the PPT please for your talk &quot;Introduction to Coherence for Developers and Architects&quot;.
I&#039;m working on a large Canadian OFM project and believe that Coherence would be a great fit, so I&#039;m looking more to guide.

can you help please ?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Loved the article, especially the diagrams, a picture 1000 words&#8230;</p>
<p>I&#8217;m trying to track down a copy of the PPT please for your talk &#8220;Introduction to Coherence for Developers and Architects&#8221;.<br />
I&#8217;m working on a large Canadian OFM project and believe that Coherence would be a great fit, so I&#8217;m looking more to guide.</p>
<p>can you help please ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Coherence 3.5: POF Extractor/Updater by Custom classes in Coherence with OCaml &#124; So I decided to take my work back underground</title>
		<link>http://blackbeanbag.net/wp/2009/07/21/coherence-3-5-pof-extractorupdater/comment-page-1/#comment-4273</link>
		<dc:creator>Custom classes in Coherence with OCaml &#124; So I decided to take my work back underground</dc:creator>
		<pubDate>Tue, 16 Aug 2011 14:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=287#comment-4273</guid>
		<description>[...] UPDATE: Perhaps I can get &#8220;close enough&#8221; with a PofExtractor. [...]</description>
		<content:encoded><![CDATA[<p>[...] UPDATE: Perhaps I can get &#8220;close enough&#8221; with a PofExtractor. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Coherence Key HOWTO by Patrick Peralta</title>
		<link>http://blackbeanbag.net/wp/2010/06/06/coherence-key-howto/comment-page-1/#comment-4267</link>
		<dc:creator>Patrick Peralta</dc:creator>
		<pubDate>Tue, 31 May 2011 02:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=409#comment-4267</guid>
		<description>RJW: this is absolutely correct!  It doesn&#039;t happen too often but I have seen it before.  It can be very confusing if you don&#039;t understand how Java serialization works internally.</description>
		<content:encoded><![CDATA[<p>RJW: this is absolutely correct!  It doesn&#8217;t happen too often but I have seen it before.  It can be very confusing if you don&#8217;t understand how Java serialization works internally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Coherence Key HOWTO by Rjw</title>
		<link>http://blackbeanbag.net/wp/2010/06/06/coherence-key-howto/comment-page-1/#comment-4265</link>
		<dc:creator>Rjw</dc:creator>
		<pubDate>Mon, 30 May 2011 10:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=409#comment-4265</guid>
		<description>One easy way to screw this up is to use java serialization or any serialisation that uses stream back references for reference equals objects. Because then your serialised form is dependent on whether your contents are interned. Eg a simple pair of integer (1,1) could end up having an inconsistent binary form if the 1 objects are reference equals. So, use EL or POF for keys, and no tricks.</description>
		<content:encoded><![CDATA[<p>One easy way to screw this up is to use java serialization or any serialisation that uses stream back references for reference equals objects. Because then your serialised form is dependent on whether your contents are interned. Eg a simple pair of integer (1,1) could end up having an inconsistent binary form if the 1 objects are reference equals. So, use EL or POF for keys, and no tricks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Coherence Key HOWTO by Ashwin Jayaprakash</title>
		<link>http://blackbeanbag.net/wp/2010/06/06/coherence-key-howto/comment-page-1/#comment-4263</link>
		<dc:creator>Ashwin Jayaprakash</dc:creator>
		<pubDate>Tue, 10 May 2011 20:15:14 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=409#comment-4263</guid>
		<description>This is a pretty common problem. I too had written about something similar a while ago - http://javaforu.blogspot.com/2009/12/primary-key-object-under-appreciated.html</description>
		<content:encoded><![CDATA[<p>This is a pretty common problem. I too had written about something similar a while ago &#8211; <a href="http://javaforu.blogspot.com/2009/12/primary-key-object-under-appreciated.html" rel="nofollow">http://javaforu.blogspot.com/2009/12/primary-key-object-under-appreciated.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Oracle Enterprise Pack for Eclipse now supports Coherence by ehcache.net</title>
		<link>http://blackbeanbag.net/wp/2010/08/09/oracle-enterprise-pack-for-eclipse-now-supports-coherence/comment-page-1/#comment-4252</link>
		<dc:creator>ehcache.net</dc:creator>
		<pubDate>Wed, 09 Mar 2011 09:05:21 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=479#comment-4252</guid>
		<description>&lt;strong&gt;Oracle Enterprise Pack for Eclipse now supports Coherence...&lt;/strong&gt;

The latest release of Oracle Enterprise Pack for Eclipse (OEPE) now includes a Coherence Facet. This makes it convenient to quickly start up a Coherence project and launch nodes right in the IDE. Recently I took it for a test drive and took some notes ...</description>
		<content:encoded><![CDATA[<p><strong>Oracle Enterprise Pack for Eclipse now supports Coherence&#8230;</strong></p>
<p>The latest release of Oracle Enterprise Pack for Eclipse (OEPE) now includes a Coherence Facet. This makes it convenient to quickly start up a Coherence project and launch nodes right in the IDE. Recently I took it for a test drive and took some notes &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Coherence*Web with JSF by ehcache.net</title>
		<link>http://blackbeanbag.net/wp/2009/03/07/using-coherenceweb-with-jsf/comment-page-1/#comment-4251</link>
		<dc:creator>ehcache.net</dc:creator>
		<pubDate>Tue, 28 Dec 2010 01:03:28 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=165#comment-4251</guid>
		<description>&lt;strong&gt;Using Coherence*Web with JSF...&lt;/strong&gt;

Recently I was helping a customer install Coherence*Web on a JSF application. After running the install and deploying the war file, I saw the following exception: javax.servlet.ServletException: Error while saving state in &#039;session&#039;: &#039;session attrib...</description>
		<content:encoded><![CDATA[<p><strong>Using Coherence*Web with JSF&#8230;</strong></p>
<p>Recently I was helping a customer install Coherence*Web on a JSF application. After running the install and deploying the war file, I saw the following exception: javax.servlet.ServletException: Error while saving state in &#8216;session&#8217;: &#8216;session attrib&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Coherence query cache technique using refresh-ahead by ehcache.net</title>
		<link>http://blackbeanbag.net/wp/2008/09/28/coherence-query-cache-technique/comment-page-1/#comment-4250</link>
		<dc:creator>ehcache.net</dc:creator>
		<pubDate>Thu, 23 Dec 2010 06:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=77#comment-4250</guid>
		<description>&lt;strong&gt;Coherence query cache technique using refresh-ahead...&lt;/strong&gt;

A few days ago I read an excellent post by Martin Elwin on creating a query cache using Coherence. To summarize, he uses a Coherence Filter (an object that contains query criteria) as a key and the results of the query (in this case, a set of keys for ...</description>
		<content:encoded><![CDATA[<p><strong>Coherence query cache technique using refresh-ahead&#8230;</strong></p>
<p>A few days ago I read an excellent post by Martin Elwin on creating a query cache using Coherence. To summarize, he uses a Coherence Filter (an object that contains query criteria) as a key and the results of the query (in this case, a set of keys for &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Coherence Key HOWTO by Anil</title>
		<link>http://blackbeanbag.net/wp/2010/06/06/coherence-key-howto/comment-page-1/#comment-4246</link>
		<dc:creator>Anil</dc:creator>
		<pubDate>Wed, 15 Dec 2010 21:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=409#comment-4246</guid>
		<description>Hi Patrick
I am working over implementing key association between Cache key and command context identifier where key operation gets executed. So i have added transient contextIdentifier to my cache key. I am able to insert the data but i am getting null when i try to retrieve the data using same key.If i remove transient contextIdentifier it works fine.I have not added transient field in hashcode ,equals , readexternal,writeexternal, This should not be problem as the field is transient.

My Cache key implementation is 
public class TradeCacheKey implements PortableObject,KeyAssociation{
	private String tradeId;
	transient private Identifier contextIdentifier;
	
	public TradeCacheKey()
	{
		
	}
	
	/**
	 * constructor to create TradecacheKey
	 * @param tradeId - tradeId of Trade
	 * @param contextIdentifier - context Identifier
	 */
	public TradeCacheKey(String tradeId, Identifier contextIdentifier) {
		
		this.tradeId = tradeId;
		this.contextIdentifier = contextIdentifier;
	}
	
	

	public TradeCacheKey(String tradeId) {
		
		this.tradeId = tradeId;
		
	}


	@Override
	public void readExternal(PofReader pofreader) throws IOException {
		// TODO Auto-generated method stub
		tradeId = pofreader.readString(0);
	//	contextIdentifier = (Identifier)pofreader.readObject(1);
	}


	@Override
	public void writeExternal(PofWriter pofwriter) throws IOException {
		// TODO Auto-generated method stub
		pofwriter.writeString(0, tradeId);
		//pofwriter.writeObject(1, contextIdentifier);
	}
	
	public String getTradeId()
	{
		return tradeId;
	}
	/**
	 * 
	 * returns hash code for this object
	 */
	public int hashCode() {

		int result = 1;
		
		result = 31
				* result
				+ ((tradeId == null) ? 0 : tradeId
						.hashCode());
		return result;
	}

	
	/**
	 * 
	 */
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TradeCacheKey other = (TradeCacheKey) obj;
		
		if (tradeId == null) {
			if (other.tradeId != null)
				return false;
		} else if (!tradeId.equals(other.tradeId))
			return false;
		
		return true;
}

	@Override
	public Object getAssociatedKey() {
		return contextIdentifier;
	}
	
	
}

I put the key to cache as 
tradeCache.put(new TradeCacheKey(trade.getTradeId(),contextIdentifier), &quot;TEST&quot;);
System.out.println(&quot; Entry inside cache is &quot; + tradeHistoryCache.get(new TradeCacheKey(trade.getTradeId())));
		
Here the second line pri nts Entry inside cache is null.
More interestingly if i get all the keys from cache and print values inside cache it gives me null
Set&lt;Entry&gt; entrySet = tradeCache.entrySet();
			Iterator&lt;Entry&gt; itr = entrySet.iterator();
			while(itr.hasNext()){
				Entry entry = itr.next();
				TradeCacheKey key = (TradeCacheKey)entry.getKey();
				System.out.println(&quot;Key is &quot; + key);
				System.out.println(&quot;Get value using key &quot; + tradeCache.get(key));
				System.out.println(&quot;Get value using new key &quot; + tradeCache.get(new TradeCacheKey(key.getTradeId())));
				
			}
The output is 
Key is com.csfb.fid.gtb.tradecache.TradeCacheKey@28ccdc70
Get value using key null
Get value using new key null

I dont know whether am i going wrong somewhere by not adding transient field to hashcode, equals, readexternal and writeexternal?</description>
		<content:encoded><![CDATA[<p>Hi Patrick<br />
I am working over implementing key association between Cache key and command context identifier where key operation gets executed. So i have added transient contextIdentifier to my cache key. I am able to insert the data but i am getting null when i try to retrieve the data using same key.If i remove transient contextIdentifier it works fine.I have not added transient field in hashcode ,equals , readexternal,writeexternal, This should not be problem as the field is transient.</p>
<p>My Cache key implementation is<br />
public class TradeCacheKey implements PortableObject,KeyAssociation{<br />
	private String tradeId;<br />
	transient private Identifier contextIdentifier;</p>
<p>	public TradeCacheKey()<br />
	{</p>
<p>	}</p>
<p>	/**<br />
	 * constructor to create TradecacheKey<br />
	 * @param tradeId &#8211; tradeId of Trade<br />
	 * @param contextIdentifier &#8211; context Identifier<br />
	 */<br />
	public TradeCacheKey(String tradeId, Identifier contextIdentifier) {</p>
<p>		this.tradeId = tradeId;<br />
		this.contextIdentifier = contextIdentifier;<br />
	}</p>
<p>	public TradeCacheKey(String tradeId) {</p>
<p>		this.tradeId = tradeId;</p>
<p>	}</p>
<p>	@Override<br />
	public void readExternal(PofReader pofreader) throws IOException {<br />
		// TODO Auto-generated method stub<br />
		tradeId = pofreader.readString(0);<br />
	//	contextIdentifier = (Identifier)pofreader.readObject(1);<br />
	}</p>
<p>	@Override<br />
	public void writeExternal(PofWriter pofwriter) throws IOException {<br />
		// TODO Auto-generated method stub<br />
		pofwriter.writeString(0, tradeId);<br />
		//pofwriter.writeObject(1, contextIdentifier);<br />
	}</p>
<p>	public String getTradeId()<br />
	{<br />
		return tradeId;<br />
	}<br />
	/**<br />
	 *<br />
	 * returns hash code for this object<br />
	 */<br />
	public int hashCode() {</p>
<p>		int result = 1;</p>
<p>		result = 31<br />
				* result<br />
				+ ((tradeId == null) ? 0 : tradeId<br />
						.hashCode());<br />
		return result;<br />
	}</p>
<p>	/**<br />
	 *<br />
	 */<br />
	public boolean equals(Object obj) {<br />
		if (this == obj)<br />
			return true;<br />
		if (obj == null)<br />
			return false;<br />
		if (getClass() != obj.getClass())<br />
			return false;<br />
		TradeCacheKey other = (TradeCacheKey) obj;</p>
<p>		if (tradeId == null) {<br />
			if (other.tradeId != null)<br />
				return false;<br />
		} else if (!tradeId.equals(other.tradeId))<br />
			return false;</p>
<p>		return true;<br />
}</p>
<p>	@Override<br />
	public Object getAssociatedKey() {<br />
		return contextIdentifier;<br />
	}</p>
<p>}</p>
<p>I put the key to cache as<br />
tradeCache.put(new TradeCacheKey(trade.getTradeId(),contextIdentifier), &#8220;TEST&#8221;);<br />
System.out.println(&#8221; Entry inside cache is &#8221; + tradeHistoryCache.get(new TradeCacheKey(trade.getTradeId())));</p>
<p>Here the second line pri nts Entry inside cache is null.<br />
More interestingly if i get all the keys from cache and print values inside cache it gives me null<br />
Set&lt;Entry&gt; entrySet = tradeCache.entrySet();<br />
			Iterator&lt;Entry&gt; itr = entrySet.iterator();<br />
			while(itr.hasNext()){<br />
				Entry entry = itr.next();<br />
				TradeCacheKey key = (TradeCacheKey)entry.getKey();<br />
				System.out.println(&#8220;Key is &#8221; + key);<br />
				System.out.println(&#8220;Get value using key &#8221; + tradeCache.get(key));<br />
				System.out.println(&#8220;Get value using new key &#8221; + tradeCache.get(new TradeCacheKey(key.getTradeId())));</p>
<p>			}<br />
The output is<br />
Key is com.csfb.fid.gtb.tradecache.TradeCacheKey@28ccdc70<br />
Get value using key null<br />
Get value using new key null</p>
<p>I dont know whether am i going wrong somewhere by not adding transient field to hashcode, equals, readexternal and writeexternal?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Partitions, Backing Maps, and Services&#8230;Oh My! by Anil</title>
		<link>http://blackbeanbag.net/wp/2010/07/01/partitions-backing-maps-and-services-oh-my/comment-page-1/#comment-4245</link>
		<dc:creator>Anil</dc:creator>
		<pubDate>Tue, 14 Dec 2010 23:28:09 +0000</pubDate>
		<guid isPermaLink="false">http://blackbeanbag.net/wp/?p=454#comment-4245</guid>
		<description>Hi Patrick,
Yes I can get access to backing map but it will be only to backing map on a node where the entry processor is running. If my cache is running on multiple nodes how can i get access of all the backing maps?

I am implementing a concurrency for cache operation. I dont want to use cache.lock as it seems to be expensive performancewise. I will explain the problem. My cache is running on Node1 and Node2. The entryprocessor for cache key key1 runs on node1. This entryprocessor needs to access/update key2 of same cache. I cant access the key2 using cache.get inside entryprocessor as it will throw pollingexception.
So The only way to handle this problem is accessing backing map. But there is no guarentee that key2 will be on node1 , it can be on node2. So how can i access backing map of node2 inside entryprocessor running on node1? Or can you suggest any other way to handle this situdation?</description>
		<content:encoded><![CDATA[<p>Hi Patrick,<br />
Yes I can get access to backing map but it will be only to backing map on a node where the entry processor is running. If my cache is running on multiple nodes how can i get access of all the backing maps?</p>
<p>I am implementing a concurrency for cache operation. I dont want to use cache.lock as it seems to be expensive performancewise. I will explain the problem. My cache is running on Node1 and Node2. The entryprocessor for cache key key1 runs on node1. This entryprocessor needs to access/update key2 of same cache. I cant access the key2 using cache.get inside entryprocessor as it will throw pollingexception.<br />
So The only way to handle this problem is accessing backing map. But there is no guarentee that key2 will be on node1 , it can be on node2. So how can i access backing map of node2 inside entryprocessor running on node1? Or can you suggest any other way to handle this situdation?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

