4

I know that Weblogic cluster replicates session state between nodes of the cluster (according to replication policy), but as far as I understand it does not replicate ServletContext (application scope) state.

Is there any configuration in Weblogic to make do this?

I have a list of messages (which are set by system admin) in application scope, and the application shows them to users.

Everything was fine before clustering the application servers, but after that there are some problems. The messages which are updated by admin are not shown to all users, and I believe the messages are just set on a single node of the cluster.

Also I track list of online users in the application (I update the list on user login and logout) and store the list in application scope. How can I maintain the list on cluster?

Amir Pashazadeh
  • 7,170
  • 3
  • 39
  • 69
  • Is it necessary to keep the messages in application scope. Because its better to keep them in session. In case tomcat it is done as follows: – Prakhar Asthana Nov 27 '14 at 12:58

1 Answers1

1

Is it necessary to keep the messages in application scope. Because its better to keep them in session. But it seems the your functionality requires so. Tell me one thing are you using Coherence in your application if so below will work :

Check below parameter for weblogic

coherence-servletcontext-clustered

Either true or false to indicate whether the attributes of the ServletContext will be clustered. If true, then all serializable ServletContext attribute values will be shared among all cluster nodes.

If unspecified, defaults to false, primarily because the Servlet specification indicates that the ServletContext attributes are local to a JVM and should not be clustered.

For more details refer http://docs.oracle.com/cd/E13924_01/coh.340/e14408/appparams.htm