[jboss-user] [Beginner's Corner] - Re: Clustering an application that uses Spring singletons

Alessandro Novarini do-not-reply at jboss.com
Thu Dec 2 10:29:33 EST 2010

Alessandro Novarini [http://community.jboss.org/people/a.novarini] created the discussion

"Re: Clustering an application that uses Spring singletons"

To view the discussion, visit: http://community.jboss.org/message/574077#574077

Just to tell you how the developers decided to solve this "issue".

Basically, the injected singleton became a service, so singleton on every node, with a dependency to the HASingletonDeployer, just like the following:


In this way the bean will be deployed just once for all the cluster instances.
>From now on, for referencing your bean, you can use the Depends annotation on the field:

private MyService myService;

In our scenario, since the data are loaded once in a day and put into the cache, we're fine even if we experience same gap before the service starts again on another node.


Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101202/2be2ca38/attachment.html 

More information about the jboss-user mailing list