users@glassfish.java.net

Re: Glassfishv2ur2 two machine cluster and Singleton class

From: <glassfish_at_javadesktop.org>
Date: Thu, 25 Feb 2010 06:55:53 PST

Thank you Alexis for the reponse.

I have a EJB Module with 3 MessageDrivenBeans . Each of these MDB listening to messgaes on Topic from JMS server in Glassfish. These MDBs upon receiving messages process the message and update a singleton cache Object (Hashmap ).

This EJB Module is working fine on single instance glassfish server.
But when i deploy this Module on two instance cluster on glassfish, i see two singleton cache objects being created corresponding to each of two node instances of glassfish, which is not desired. Hence the application is failing.

How can i get singleton cache object on multi instance cluster environment ?
[Message sent by forum member 'mavula8743' (m_k_avula_at_yahoo.com)]

http://forums.java.net/jive/thread.jspa?messageID=388673