users@glassfish.java.net

RE: Re: Enable Session Memory Replication

From: Asleson, Ryan <asleson_at_BIWORLDWIDE.com>
Date: Mon, 11 Feb 2008 14:47:37 -0600

 
Thank you Larry!
 
I'm part way there. I undeployed the application from Glassfish and
redeployed it (all from the online admin console) while sure to check
"Availability" during deployment. Session replication and failover now
works on a cluster where the cluster instances reside on the same
computer. So, I think the configuration is working.
 
However, when I tweak the web server to point to a cluster where the two
instances are on different computers, the session replication and
failover doesn't work. Same application.
 
Any idea why? Is there something I can check to help me figure it out?
 
 

________________________________

From: Larry.White_at_Sun.COM [mailto:Larry.White_at_Sun.COM]
Sent: Monday, February 11, 2008 12:25 PM
To: users_at_glassfish.dev.java.net
Subject: Re: Enable Session Memory Replication


Hi Ryan:

When difficulties like this arise, we generally recommend that people
validate their environment by using the sample app clusterjsp.

This app works for us reproducibly. So a good first step is to ensure
it is working in your environment.

One thing I noticed in your writeup that is potentially problematic is
this (that you wrote):

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?
When you deploy or re-deploy an app, as part of the loading process it
checks
for correct configuration and then if all is well, your runtime
deployment will be
usinga replication-aware manager. Once the app is already deployed and
is
non-replicating, simply changing the value of the availability-enabled
without undeploying
and redeploying will have no positive effect. So I was wondering if
that is your
problem.

Once your app is loading as replication enabled you should see messages
in the
server.log showing jxta pipes being connected. If you are not seeing
that then
there is still something wrong with your configuration.

Asleson, Ryan wrote:


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


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.