users@glassfish.java.net

Re: Enable Session Memory Replication

From: Gopal Jorapur <Gopal.Jorapur_at_Sun.COM>
Date: Mon, 11 Feb 2008 10:00:42 -0800

Hi Ryan,

The persistence-type need to be replicated

Here is a blog on how to get it working

https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html

First try with the sample application bundled with glassfish, once you
get it working, you can try your app

Thanks,
Gopal

Asleson, Ryan wrote:

>OK, instead of using a cluster consisting of instances on different
>physical machines, I'm using a cluster where all instances are on the
>same machine. Same result -- the session doesn't seem to be replicated.
>
>What else can I check? Is there a way to see if the server is even
>attempting to replicate the session? I'm sure it's something silly I'm
>forgetting, but I don't know what.
>
>To recap:
>
>1. I have the <distributable/ > tag in web.xml.
>
>2. The sun-web.xml is what is found below. BTW -- should the
>persistence-type be "replicated" or "memory" ?
>
>3. The "Availability" check box for the app is checked.
>
>Thank you!!!
>
>
>
>-----Original Message-----
>From: Asleson, Ryan [mailto:asleson_at_BIWORLDWIDE.com]
>Sent: Monday, February 11, 2008 7:47 AM
>To: users_at_glassfish.dev.java.net
>Subject: RE: Re: Enable Session Memory Replication
>
>
>
>I do have the <distributable /> tag in web.xml. Also, the sun-web.xml
>looks like what appears below. Is there anything else to check? I saw
>some errors in the log about items not being serializable, but I fixed
>those yet the memory replication doesn't appear to be working.
>
>Is there a way to know if the session replication is even being
>attempted?
>
>
>
><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application
>Server 9.0 Servlet 2.5//EN"
>"http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
><sun-web-app error-url="">
> <session-config>
> <session-manager persistence-type="replicated">
> <manager-properties>
> <property name="persistenceFrequency"
>value="web-method"/>
> </manager-properties>
> <store-properties>
> <property name="persistenceScope" value="session"/>
> </store-properties>
> </session-manager>
> <session-properties/>
> <cookie-properties/>
> </session-config>
></sun-web-app>
>
>
>
>
>-----Original Message-----
>From: Peter.Fabian_at_Sun.COM [mailto:Peter.Fabian_at_Sun.COM]
>Sent: Friday, February 08, 2008 3:38 PM
>To: users_at_glassfish.dev.java.net
>Subject: Re: Enable Session Memory Replication
>
>Asleson, Ryan wrote:
>
>
>>
>>Hello,
>>
>>I have successfully created a clustered Glassfish development
>>environment using the instructions found here:
>>
>>https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html
>>
>>I have 3 computers: One running the Sun web server with the load
>>balancer plugin, one computer running a server instance, and one
>>computer running a server instance and that also acts as the DAS.
>>
>>I created an application that stores data in session. I can use the
>>application and see that both instances in the cluster are being used.
>>
>>I start some work on instance1. Then, I shut down instance1. Next, I
>>
>>
>
>
>
>>return to the application and go to the next page. I can see that
>>instance2 is being used (which is correct, since instance1 was shut
>>down) however none of the session data appears.
>>
>>After deploying the application to the cluster, I check the
>>"Availability" check box in the admin console and save. This is
>>supposed to enable in-memory session replication, right?
>>
>>
>>
>The web-app element of the web.xml deployment descriptor file must
>contain the distributable element.
>http://docs.sun.com/app/docs/doc/819-3679/abdkz?a=view
>
>
>
>--
>Peter Fabian
>Sun Software
>
>AIM/skype:fabianpetergabor
>Sun corp IM:pf120168_at_sun.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>This e-mail message is being sent solely for use by the intended
>recipient(s) and may contain confidential information. Any unauthorized
>review, use, disclosure or distribution is prohibited. If you are not
>the intended recipient, please contact the sender by phone or reply by
>e-mail, delete the original message and destroy all copies. Thank you.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>