aspose file tools*
The moose likes BEA/Weblogic and the fly likes Cluster environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Cluster environment" Watch "Cluster environment" New topic
Author

Cluster environment

naveen
Greenhorn

Joined: Sep 09, 2005
Posts: 6
If you are deploying your application in weblogic cluster environment, what should be taken care of in your application, so that it runs fine in cluster environment
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Servlets and JSPs
=================

1. To support in-memory replication of HTTP session states, all servlet and JSP session data must be serializable. This means that every field in an object must be serializable or transient in order for the object to be considered serializable.

2. In an HTTP servlet that implements javax.servlet.http.HttpSession, use HttpSession.setAttribute (which replaces the deprecated putValue) to change attributes in a session object. If you set attributes in a session object with setAttribute, the object and its attributes are replicated in a cluster using in-memory replication. If you use other set methods to change objects within a session, WebLogic Server does not replicate those changes. Every time a change is made to an object that is in the session, setAttribute() should be called to update that object across the cluster.

Likewise, use removeAttribute (which, in turn, replaces the deprecated removeValue) to remove an attribute from a session object.

3. If you use multiple frames, you need to control frame access to session data as you can get unexpected behaviour in a cluster. The recommended rules to reduce problems are:
In a given frameset, ensure that only one frame creates and modifies session data.

Always create the session in a frame of the first frameset your application uses (for example, create the session in the first HTML page that is visited). After the session has been created, access the session data only in framesets other than the first frameset.

EJBs
====
Always declare static fields as final. Failure to do this can easily cause problems when the EJBs are distributed as a field can have varying values in different JVMs.

Non-Clustered Objects
=====================
Be aware that File services and Time services cannot be clustered.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

"naveen",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cluster environment