一.编辑weblogic.xml配置文件放到WEB应用程序的WEB-INF目录下,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
<session-descriptor>
<debug-enabled>true</debug-enabled>
<persistent-store-type>replicated</persistent-store-type>
<sharing-enabled>true</sharing-enabled>
</session-descriptor>
<context-root>/</context-root>
</weblogic-web-app>
二.在IE地址栏中输入例如http://210.41.121.134:8080/,并登录系统执行业务操作,这时你可以随便关闭或打开Managed_Server_1或Managed_Server2,只要保持有一个Managed_Server是启动状态,业务操作仍可继续执行,不必重新登录。
出现错误:
Replicated HTTP sessions specified for webapp , but clustering not enabled
这个是由于weblogic.xml里面的 PersistentStoreType 这个设置不符合造成
双机状态一般是PersistentStoreType 为replicated
单机为PersistentStoreType 为memory
就不会出现标题的异常
本文介绍了如何通过编辑weblogic.xml配置文件实现WebLogic Server集群中的Session共享,并解决了配置不当时出现的异常问题。

4594

被折叠的 条评论
为什么被折叠?



