[infinispan-dev] Grid singletons using Infinispan ?

Tristan Tarrant tristan.tarrant at gmail.com
Fri Oct 29 10:50:04 EDT 2010


I have figured out a solution to my use case:

I setup a listener on the ViewChanged event, and if a particular node
becomes coordinator, then it holds the singleton (usually just a service
running as a thread).

Sorry for creating confusion :)

Tristan

On Thu, Oct 21, 2010 at 11:34, Tristan Tarrant <tristan.tarrant at gmail.com>wrote:

> On Thu, Oct 21, 2010 at 11:08, Galder Zamarreño <galder at redhat.com> wrote:
>
>>
>> On Oct 21, 2010, at 9:42 AM, Tristan Tarrant wrote:
>>
>> > I have browsed quickly through the Infinispan docs, but I haven't found
>> anything that would help me with what I need.
>> > 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 ?
>>
>> Hmmm, Infinispan is not an app server and hence does not do deployments,
>> so not sure what you refer to.
>>
>>
> 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.
>
> This can be done with JGroups, but I wanted something a bit more
> "abstracted" from the transport's implementation.
>
> Tristan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20101029/d5a26d2e/attachment.html 


More information about the infinispan-dev mailing list