This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Can't replicate session on clustered weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Can Watch "Can New topic

Can't replicate session on clustered weblogic

agung iswara

Joined: Jan 12, 2011
Posts: 1
hi all,

i try to simulate weblogic cluster on single machine. but why my weblogic installation can't replicate the session to another manage server? i try to listen from HttpSessionListener for any event (session create or destroy), but only one manage server that handling request and create the session. the other don't. where is my configuration wrong?

and when i try to access web without session, server will switched to handle the request. but when the already have the session, request will only stick on one server per session
i try to use weblogic 9 and 10.3. both behavior is the same.

here is my weblogic configuration :

Manage Server :

1. address (localhost:7004); name (ms1); machine (mcn1)
2. address (localhost:7005); name (ms2); machine (mcn1)

every session object on managed server is serializable.
and weblogic.xml on every manage server :

Cluster messaging mode is multicast. i try MulticastTest, and its working fine.

Load balancing :
i create new domain (localhost:7002) and use weblogic proxy for load balancing. just copy paste from the documentation.

weblogic.xml on proxy domain (load balancing)

web.xml (load balancing)

thank you!
Mohammad Al Hadid

Joined: Jan 05, 2011
Posts: 10
dear ,

I think that you need to add the following tag to the weblogic.xml


I hope that helps you, and let me know whether it is working fine or not

Mohammad Al Hadid

Joined: Jan 05, 2011
Posts: 10
I think that you can do one thing (but make it temp) and remove it when deploy to production

private void saveToSession(String name, Object value){

if(value == null){
if (!(value instanceof Serializable)) {
\\log("The Object --->>>" + name + " is not serialized");
getSession().setAttribute(name, value);

Tarun Boyella

Joined: Jun 15, 2009
Posts: 6
Can you just by modifying weblogic.xml with below content, remove the debug inside weblogic.xml.

Also you can refer to knowledge article Note 1157842.1 in my oracle support portal which has sample for testing different types of session replication.


Hope this helps.

- Tarun
I agree. Here's the link:
subject: Can't replicate session on clustered weblogic
It's not a secret anymore!