Cluster replication problem, help me!

Discussions

EJB design: Cluster replication problem, help me!

  1. Cluster replication problem, help me! (5 messages)

    I have a problem about cluster replication, if anyone knows about it, please tell me.
    I have setted up a cluster with 3 application server, and when user access one of them, the server will add some data into memory. I think the cluster should automaticly replicate the data into other 2 servers. This is right? But the data not been replicated. why? should I do some config to replicate the data?

    thanks

    Threaded Messages (5)

  2. Cluster replication problem, help me![ Go to top ]

    It depends on what kind of data you're talking about. Usually in a cluster the application server would store some information regarding the HTTP session into memory, but not the application data. If you need application data to be replicated, then yes you need to do some coding yourself.

    Also, what specific application server you're using, and what version? Each vendor has some unique implementations.
  3. I'm using weblogic 7.0[ Go to top ]

    Hi Alan,
     Thank you for the reply. I'm using the weblogic 7.0, and I check the document that it support http session and ejb replication. But my data is store in the static variable of a class which in application layer, so I think I should replicate myself or change the variable as a static variable of a ejb class, right?

     thanks
  4. I'm using weblogic 7.0[ Go to top ]

    Hi Alan,

    >  Thank you for the reply. I'm using the weblogic 7.0, and I check the document that it support http session and ejb replication. But my data is store in the static variable of a class which in application layer, so I think I should replicate myself or change the variable as a static variable of a ejb class, right?
    >
    >  thanks

    In clustered environment, same instance of the application will be running in different instances of weblogic application server. Among these weblogic server instances if the state information is stored in httpsession then httpsession synchroniztion happens at regular intervals as per settings. In order for the http session to get replicated properly the programming considerations should be adhered to:
    1. Session Data Must Be Serializable
       To support in-memory replication of HTTP session states, all servlet and JSP session data must be serializable

    2. Use setAttribute to Change Session State

    3. Consider Serialization Overhead

    4. Control Frame Access to Session Data

    Coming to application data and static information remains same across different instances of the application which are running in the weblogic cluster. If application scope data is getting added based on different scenarios during the application run then this needs to be handled programmatically in the application coding for clustered environment.
  5. Clustered Replication[ Go to top ]

    This is exactly what Coherence's Replicated Cache does. Allowing for the replication and synchronization of cached (in-memory) data across the cluster throughout the application layer.

    Later,
    Rob Misek
    Tangosol Coherence: Cluster your Work. Work your Cluster.
    Coherence Forums.
  6. I'm using weblogic 7.0[ Go to top ]

    Hi.

    Yes, weblogic replicates Http session and SFSB data.

    You should not store session specific data in the static variables. If you can do this then its not session specific. Use SFSB fields (which are not static)for this.