• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't replicate session on clustered weblogic

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
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!
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear ,

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

<wls:session-descriptor>
<wls:cookie-name>MYJSESSIONID</wls:cookie-name>
<wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>
</wls:session-descriptor>

I hope that helps you, and let me know whether it is working fine or not:)
 
Mohammad Al Hadid
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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){
removeFromSession(name);
}else{
if (!(value instanceof Serializable)) {
\\log("The Object --->>>" + name + " is not serialized");
}
getSession().setAttribute(name, value);
}

}
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=SAMPLE%20CODE&id=1157842.1

<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
</session-descriptor>

Hope this helps.

- Tarun
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic