persistence@glassfish.java.net

Re: TopLink Cluster Documentation

From: Tom Ware <tom.ware_at_oracle.com>
Date: Wed, 30 Aug 2006 13:04:02 -0400

Hi Peter,

  Server sessions and client sessions are not distributed artifacts.
They are a means of managing applications that run on the same server.

  The way to manage applications running on distributed servers is to
configure all of the things mentioned below in a manner appropriate for
your architecture. (optimistic locking, cache type/size, and query
refreshing)

  A feature request for that kind of support in TopLink Essentials would
be a good idea.

-Tom

Peter Havelaar wrote:

>Hi Tom and Doug,
>
>how do you create a client session from server A (running on host A) to one
>server session on server B (running on host B).
>And how do you configure the mechanism for the sessions to communicat
>changes to each other.
>
>Kind regards,
>Peter
>
>----- Original Message -----
>From: "Tom Ware" <tom.ware_at_oracle.com>
>To: <persistence_at_glassfish.dev.java.net>
>Sent: Wednesday, August 30, 2006 5:53 PM
>Subject: Re: TopLink Cluster Documentation
>
>
>Hi Peter,
>
> 'Just a small addition to Doug's comments about configuration.
>
> When you are using JPA, you automatically get server sessions and
>client sessions. An EntityManagerFactory has a server session that
>exists in it (and is in fact, somewhat analagous to a server session).
>As you obtain EntityManager's from it, you get EntityManager's that have
>client sessions derived from that server session. The configuration
>information Doug supplied below allows you to configure how the caching
>will occur in those sessions.
>
>-Tom
>
>Doug Clarke wrote:
>
>
>
>>Peter,
>>
>>TopLink's default caching is to cache entities in its shared cache,
>>container within the server session. This shared cache spans entity
>>managers and transactions.
>>
>>As shown in table 1-2 of Tom's second link there are two persistence unit
>>properties of interest:
>>
>>toplink.cache.shared.default - the default caching used for all entity
>>types. Setting this to false will put you in a cache per EntityManager
>>(client session) with no sharing between clients.
>>
>>toplink.cache.shared.<ENTITY> - allows you to use a different setting per
>>entity type then the default.
>>
>>Cheers,
>>
>>Doug
>>
>>-----Original Message-----
>>From: Peter Havelaar [mailto:peter-java_net_at_jabbah.net]
>>Sent: Wednesday, August 30, 2006 11:34 AM
>>To: persistence_at_glassfish.dev.java.net
>>Subject: Re: Toplink Cluster Documentation
>>
>>
>>Thank you Tom,
>>
>>I see when persisting an object it gets written to the session cache of the
>>parent server.
>>How do you configure Toplink to have a session server and clients?
>>
>>Regards,
>>Peter
>>
>>----- Original Message -----
>>From: "Tom Ware" <tom.ware_at_oracle.com>
>>To: <persistence_at_glassfish.dev.java.net>
>>Sent: Wednesday, August 30, 2006 3:56 PM
>>Subject: Re: Toplink Cluster Documentation
>>
>>
>>Hi Peter,
>>
>>TopLink Essentials does not currently include any specific clustering
>>support. Its caching functions in a cluster through effective configuration
>>of optimistic locking, cache type/size, and query refreshing.
>>
>>Here is a good article describing the core locking/caching functionality of
>>TopLink -
>>http://www.oracle.com/technology/tech/java/newsletter/articles/toplink/toplink_caching_locking.html
>>
>>For details of how to configure TopLink Essential's caching see -
>>http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html#TopLinkCaching
>>
>>
>>-Tom
>>
>>Peter Havelaar wrote:
>>
>>
>>
>>
>>
>>>Hello guys,
>>>
>>>I have been trying to find the documentation of how to setup a cluster
>>>configuration with Toplink JPA in glassfish.
>>>Can anyone point me in the right direction?
>>>And how does Toplink's cluster capabilities integrate with Glassfish's
>>>V2 new cluster abilities.
>>>
>>>Regards,
>>>Peter Havelaar
>>>
>>>
>>>
>>>
>>
>>
>>