Skip to main content

multiple GF instances

5 replies [Last post]
gholmer
Offline
Joined: 2003-06-11
Points: 0

I thought I had sent this, but don't see it on the list...

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?

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

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mgainty
Offline
Joined: 2004-05-21
Points: 0

Martin Gainty
______________________________________________
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

MG>'Morning Glenn

> Date: Wed, 13 Nov 2013 08:11:56 -0600
> From: gholmer@weycogroup.com
> To: users@glassfish.java.net
> Subject: multiple GF instances
>
> I thought I had sent this, but don't see it on the list...
>
> 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

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

MG>HTH,
MG>Martin

mgainty
Offline
Joined: 2004-05-21
Points: 0

From: mgainty@hotmail.com
To: users@glassfish.java.net
Subject: RE: multiple GF instances
Date: Wed, 13 Nov 2013 09:41:32 -0500

Martin Gainty
______________________________________________
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

MG>'Morning Glenn

> Date: Wed, 13 Nov 2013 08:11:56 -0600
> From: gholmer@weycogroup.com
> To: users@glassfish.java.net
> Subject: multiple GF instances
>
> I thought I had sent this, but don't see it on the list...
>
> 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>Putting Semantic diatribes aside ..Under the covers its Oracle TopLink
MG>Second issue 75% of the shops I have worked in use Hibernate...no I am no fan but since
MG>any proposed distributed caching solution must work for all ORMs ..and not be tied to any one vendor
MG>That said if I went to CTO and said you HAVE TO transform all of your Hibernate Entity to
MG>EclipseLink / TopLink Entity
MG>because someone on Glassfish Users said so ..
MG>His response would be read this and explain the solution(s)
MG>http://mcqueeney.com/blog/two-reasons-to-prefer-hibernate-jpa-over-eclipselink-on-glassfish/
MG>?

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

MG>HTH,
MG>Martin

gholmer
Offline
Joined: 2003-06-11
Points: 0

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

mgainty
Offline
Joined: 2004-05-21
Points: 0

Hi Glenn

I saw that too

Having developed first with Jdeveloper then Netbeans then Eclipse i didnt want to steer you in Eclipse IDE only solution
Having written Eclipse1 plugin...moving to Eclipse2 or P2 for plugins can be a bit of a *challenge*

Glad to hear you have a solution!
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

> Date: Wed, 13 Nov 2013 10:15:11 -0600
> From: gholmer@weycogroup.com
> To: users@glassfish.java.net
> Subject: Re: multiple GF instances
>
> 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

gholmer
Offline
Joined: 2003-06-11
Points: 0

On 11/14/2013 09:33 AM, Martin Gainty wrote:
> Having developed first with Jdeveloper then Netbeans then Eclipse i
> didnt want to steer you in Eclipse IDE only solution
> Having written Eclipse1 plugin...moving to Eclipse2 or P2 for plugins
> can be a bit of a *challenge*

Huh? GlassFish ships with EclipseLink as its JPA provider; it has
nothing to do with the Eclipse IDE.

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