8 Replies Latest reply on Aug 19, 2003 1:03 PM by slaboure

    HTTP Session Replication

    monasehgal


      Hi my 2 instances of jboss-3.0.6_tomcat-4.1.18 are running on 2 windows m/cs in cluster mode . Now i want to incorporate HTTP Session Replication.The document specified to make the distributable tag to true in the WEB-INF/web.xml of my WAR file but the problem is i don't have any such tag there do i add it explicitly or am i missing something .Should i be adding the statement myself if yes then what is the exact statement to add. I'm attaching my web.xml.I would appriciate your suggestions

        • 1. Re: HTTP Session Replication
          heartbit

          Actually, it's not just JBoss issue but J2EE standard. And yes, you do it explicitly. Check the DTD "http://java.sun.com/dtd/web-app_2_3.dtd" and insert right before <welcome-file-list>.

          • 2. Re: HTTP Session Replication
            monasehgal

            Thanx a lot for your timely help.
            I had 1 more question if u can help

            While starting my server i notice the following error
            ...
            ....
            2003-08-07 11:26:49,268 INFO [org.jboss.web.localhost.Engine] ContextConfig[/web-client]: Added certificates -> request attribute Valve
            2003-08-07 11:26:49,579 INFO [org.jboss.web.catalina.EmbeddedCatalinaService41] Using Java2 parent classloader delegation: true
            2003-08-07 11:26:49,589 INFO [org.jboss.web.localhost.Engine] StandardManager[/web-client]: Seeding random number generator class java.security.SecureRandom
            2003-08-07 11:26:49,599 INFO [org.jboss.web.localhost.Engine] StandardManager[/web-client]: Seeding of random number generator has been completed
            2003-08-07 11:26:49,619 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/web-client:default]: Loading container servlet default
            2003-08-07 11:26:49,639 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/web-client:invoker]: Loading container servlet invoker
            2003-08-07 11:26:49,669 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss1/jboss-3.0.6_tomcat-4.1.18/server/all/deploy/web-client.war
            2003-08-07 11:26:49,689 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
            Cause: Incomplete Deployment listing:
            Packages waiting for a deployer:

            Incompletely deployed packages:

            MBeans waiting for classes:

            MBeans waiting for other MBeans:
            [ObjectName: jboss:service=ClusteredHttpSession
            state: CONFIGURED
            I Depend On: jboss.j2ee:service=EJB,jndiName=clustering/HTTPSession

            Depends On Me: , ObjectName: jboss:service=HASessionState
            state: CONFIGURED
            I Depend On: jboss:service=DefaultPartition

            Depends On Me: , ObjectName: jboss:service=FarmMember,partition=DefaultPartition
            state: CONFIGURED
            I Depend On: jboss:service=DefaultPartition
            jboss.ejb:service=EJBDeployer
            jboss.system:service=MainDeployer

            Depends On Me: , ObjectName: jboss.j2ee:service=EJB,jndiName=clustering/HTTPSession
            state: NOTYETINSTALLED
            I Depend On: jboss:service=DefaultPartition
            jboss:service=invoker,type=jrmp

            Depends On Me: jboss:service=ClusteredHttpSession
            ]
            2003-08-07 11:26:49,959 INFO [org.jboss.deployment.scanner.URLDeploymentScanner] Started
            2003-08-07 11:26:49,959 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss1/jboss-3.0.6_tomcat-4.1.18/server/all/conf/jboss-service.xml
            2003-08-07 11:26:49,979 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.0.6 (CVSTag=JBoss_3_0_6 Date=200301260037)] Started in 1m:8s:158ms

            If u can give any suggestions it would be great.

            • 3. Re: HTTP Session Replication
              monasehgal

              I had one more question
              After implementing the HTTP Session replication
              and starting my server

              the following things appear on the server
              ..
              ..
              Exception in MBean operation 'checkIncompleteDeployments()'
              Cause: Incomplete Deployment listing:
              Packages waiting for a deployer:

              Incompletely deployed packages:

              MBeans waiting for classes:

              MBeans waiting for other MBeans:
              [ObjectName: jboss:service=ClusteredHttpSession
              state: CONFIGURED
              I Depend On: jboss.j2ee:service=EJB,jndiName=clustering/HTTPSession

              Depends On Me: , ObjectName: jboss:service=HASessionState
              state: CONFIGURED
              I Depend On: jboss:service=DefaultPartition

              Depends On Me: , ObjectName: jboss:service=FarmMember,partition=DefaultPartition
              state: CONFIGURED
              I Depend On: jboss:service=DefaultPartition
              jboss.ejb:service=EJBDeployer
              jboss.system:service=MainDeployer

              Depends On Me: , ObjectName: jboss.j2ee:service=EJB,jndiName=clustering/HTTPSession
              state: NOTYETINSTALLED
              I Depend On: jboss:service=DefaultPartition
              jboss:service=invoker,type=jrmp

              Depends On Me: jboss:service=ClusteredHttpSession
              ]
              2003-08-07 11:41:56,373 INFO [org.jboss.deployment.scanner.URLDeploymentScanner] Started
              2003-08-07 11:41:56,373 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss1/jboss-3.0.6_tomcat-4.1.18/server/all/conf/jboss-service.xml
              2003-08-07 11:41:56,393 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.0.6 (CVSTag=JBoss_3_0_6 Date=200301260037)] Started in 0m:58s:384ms

              At one point it says
              [ObjectName: jboss:service=ClusteredHttpSession
              state: CONFIGURED
              I Depend On: jboss.j2ee:service=EJB,jndiName=clustering/HTTPSession

              and then again it says

              Depends On Me: , ObjectName: jboss.j2ee:service=EJB,jndiName=clustering/HTTPSession
              state: NOTYETINSTALLED
              I Depend On: jboss:service=DefaultPartition
              jboss:service=invoker,type=jrmp

              So i am not sure if it has been installed or not
              Any suggestions ??
              Thanx

              • 4. Re: HTTP Session Replication
                usiwill

                Have you changed the name of your cluster service? It looks to me like you didn't update all of the dependencies that the other HA services have on the main cluster service.

                -Will

                • 5. Re: HTTP Session Replication
                  monasehgal

                  No i did not i just changed the partition name for the Cluster Partition :defines cluster
                  and HA JINDI

                  but not for the HA Session State Service for SFSB
                  in the main cluster-service.xml

                  Oh so do i need to change that even if i'm just doing the server clustering and HTTP Session replication.

                  I'm sorry if the the question is too silly
                  I'm new to jboss and just trying to figure out things

                  • 6. Re: HTTP Session Replication
                    monasehgal

                    Sorry about that
                    I'm attaching my cluster-service.xml
                    for covenience.

                    <?xml version="1.0" encoding="UTF-8"?>

                    <!-- ===================================================================== -->
                    <!-- -->
                    <!-- Sample Clustering Service Configuration -->
                    <!-- -->
                    <!-- ===================================================================== -->





                    <!-- ==================================================================== -->
                    <!-- Cluster Partition: defines cluster -->
                    <!-- ==================================================================== -->



                    <!-- Name of the partition being built -->
                    MyPartition
                    <!-- Determine if deadlock detection is enabled -->
                    true
                    <!-- The JavaGroups protocol configuration -->


                    <!-- UDP: if you have a multihomed machine,
                    set the bind_addr attribute to the appropriate NIC IP address -->
                    <!-- UDP: On Windows machines, because of the media sense feature
                    being broken with multicast (even after disabling media sense)
                    set the loopback attribute to true -->
                    <UDP mcast_addr="228.1.2.3" mcast_port="45566"
                    ip_ttl="64" ip_mcast="true"
                    mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
                    ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
                    loopback="true" />
                    <PING timeout="2000" num_initial_members="3"
                    up_thread="false" down_thread="false" />
                    <MERGE2 min_interval="5000" max_interval="10000" />
                    <FD up_thread="false" down_thread="false" />
                    <VERIFY_SUSPECT timeout="1500"
                    up_thread="false" down_thread="false" />
                    <pbcast.STABLE desired_avg_gossip="20000"
                    up_thread="false" down_thread="false" />
                    <pbcast.NAKACK gc_lag="50" retransmit_timeout="300,600,1200,2400,4800"
                    up_thread="false" down_thread="false" />
                    <UNICAST timeout="5000" window_size="100" min_threshold="10"
                    down_thread="false" />
                    <FRAG frag_size="8192"
                    down_thread="false" up_thread="false" />
                    <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
                    shun="false" print_local_addr="true" />
                    <pbcast.STATE_TRANSFER up_thread="false" down_thread="false" />




                    <!-- ==================================================================== -->
                    <!-- HA Session State Service for SFSB -->
                    <!-- ==================================================================== -->


                    jboss:service=MyPartition
                    <!-- Name of the partition to which the service is linked -->
                    MyPartition
                    <!-- JNDI name under which the service is bound -->
                    /HASessionState/Default
                    <!-- Max delay before cleaning unreclaimed state.
                    Defaults to 30*60*1000 => 30 minutes -->
                    0


                    <!-- ==================================================================== -->
                    <!-- HA JNDI -->
                    <!-- ==================================================================== -->


                    jboss:service=MyPartition
                    <!-- Name of the partition to which the service is linked -->
                    MyPartition
                    <!-- RmiPort to be used by the HA-JNDI service
                    once bound. 0 => auto. -->
                    0
                    <!-- Port on which the HA-JNDI stub is made available -->
                    1100
                    <!-- Backlog to be used for client-server RMI
                    invocations during JNDI queries -->
                    50

                    <!-- Client socket factory to be used for client-server
                    RMI invocations during JNDI queries -->
                    <!--attribute name="ClientSocketFactory">custom</attribute-->
                    <!-- Server socket factory to be used for client-server
                    RMI invocations during JNDI queries -->
                    <!--attribute name="ServerSocketFactory">custom</attribute-->



                    <!--
                    0
                    custom
                    custom
                    custom
                    -->



                    • 7. Re: HTTP Session Replication
                      usiwill

                      ClusteredHTTPSession, Farming and Clustering/HTTPSession all have dependencies on each other and ultimately the ClusterService. If you are not using Farming and HTTP Session Replication, you can remove these deployments. If you wish to keep them, you must ensure that your JNDI names are accurate in all of your depends tags. It looks to me like you have changed the JNDI name of your cluster service and not replicated that change to the other service depends tags.

                      -Will

                      • 8. Re: HTTP Session Replication
                        slaboure

                        HASessionState is still pointing to "DefaultPartition" which is why it fails. it is easier to keep "DefaultPartition" named like this otherwise you may end up (as you did) forgetting to change it somewhere.

                        sacha