persistence@glassfish.java.net

Re: TopLink Cluster Documentation

From: Tom Ware <tom.ware_at_oracle.com>
Date: Wed, 30 Aug 2006 11:53:10 -0400

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
>>
>>
>
>
>