users@glassfish.java.net

Re: multiple GF instances

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Wed, 13 Nov 2013 10:15:11 -0600

On 11/13/2013 08:41 AM, Martin Gainty wrote:
> > If we wanted to do load balancing without using clustering, but just
> > with two complete instances of GlassFish, what would be the implication
> > of both instances using the same database? Wouldn't you run into
> > problems because of each EJB container caching the entity classes?
> MG>Ehcache will cache your DB calls for each configured instance
> MG>The newest EhCache has listeners that multicast Update events so
> Other Ehcache nodes can pick up the updates
> MG>you'll want to coordinate with net-admin to open up the hosts and RMI
> ports EhCache implements
> MG>http://www-01.ibm.com/support/docview.wss?uid=swg21519527

Looks like EclipseLink provides something like that out-of-box:

http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination

-- 
Glenn Holmer
Weyco Group, Inc.
phone: 414-908-1809
fax: 414-908-1601