<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 21 Oct 2010, at 10:34, Tristan Tarrant wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Thu, Oct 21, 2010 at 11:08, Galder Zamarreņo <span dir="ltr">&lt;<a href="mailto:galder@redhat.com">galder@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Oct 21, 2010, at 9:42 AM, Tristan Tarrant wrote:<br>
<br>
&gt; I have browsed quickly through the Infinispan docs, but I haven't found anything that would help me with what I need.<br>
&gt; In the past I have used JBoss' feature for deploying cluster-wide singletons, but obviously this is app-server-dependent. Is it possible to use Infinispan to implement the same thing ?<br>
<br>
</div>Hmmm, Infinispan is not an app server and hence does not do deployments, so not sure what you refer to.<br><br></blockquote><div><br></div><div>I didn't explain myself properly. I don't want Infinispan to implement cluster singletons for me, but I would like to leverage Infinispan's features to implement the singleton myself. For example by binding a key in the cache to its owner (the first node to put() the key in the cache). If the owner "disappears", someone else might take ownership of that key.</div></div></blockquote>Not sure I get your example entirely: key ownership is already happening if you use numOwners&gt;0, as keys have backups. Also when you talk about a singleton in AS I'm rather thinking about a service that gets executed on a single node only about sheer state.<br>I've used something similar for implementing clustered continuous query[1].</div><div>What I have is a "pice of code" that is notified whenever something changes in the cache. The code gets executed on a single node. If that node crashes then a different node takes the responsibility of executing it etc. &nbsp;At the moment is quite limited: doesn't support distribution only total replication.&nbsp;</div><div>[1]</div><div><blockquote type="cite"><div class="gmail_quote">
<div><br></div><div>This can be done with JGroups, but I wanted something a bit more "abstracted" from the transport's implementation.</div><div><br></div><div>Tristan</div></div>
_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br></body></html>