replicate session in clustering weblogic v10.3
来源:互联网 发布:荣威rx5矩阵大灯多少钱 编辑:程序博客网 时间:2024/04/30 00:58
Even set 2 weblogic instances as clustering servers, the session can not be replicated by default.
let's we have the code to get session as follows.
HttpSession session = request.getSession();
Object myObj = session.getAttribute("myObjKey");
If want to replicate the session during clustering weblogic instances, need to modify weblogic.xml as follows.
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<session-descriptor>
<persistent-store-type>replicated_if_clustered</persistent-store-type>
<sharing-enabled>true</sharing-enabled>
</session-descriptor>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<context-root>/mycontext</context-root>
</weblogic-web-app>
-- persistent-store-type
Sets the persistent store method to one of the following options:
-
memory
—Disables persistent session storage. -
replicated
—Same asmemory
, but session data is replicated across the clustered servers. - replicated_if_clustered—If the Web application is deployed on a clustered server, the in-effect
persistent-store-type
will be replicated. Otherwise,memory
is the default. - async-replicated—Enables asynchronous session replication in an application or web application. See Configuring Session Persistence.
- async-replicated-if-clustered—Enables asynchronous session replication in an application or web application when deployed to a cluster environment. If deployed to a single server environment, then the session persistence/replication defaults to in-memory. This allows testing on a single server without deployment errors.
-
file
—Uses file-based persistence (See also persistent-store-dir). -
async-jdbc
—Enables asynchronous JDBC persistence for HTTP sessions in an application or web application. See Configuring Session Persistence. -
jdbc
—Uses a database to store persistent sessions. (see also persistent-store-pool). - cookie—All session data is stored in a cookie in the user’s browser.
-- sharing-enabled
Enables Web applications to share HTTP sessions when the value is set to true
at the application level.
The context-root element defines the context root of this stand-alone Web application. If the Web application is part of an EAR, not stand-alone, specify the context root in the EAR’s META-INF/application.xml file. A context-root setting in application.xml takes precedence over context-root setting in weblogic.xml.
- Check application.xml for context root; if found, use as Web application’s context root.
- If context root is not set in application.xml, and the Web application is being deployed as part of an EAR, check whether context root is defined in weblogic.xml. If found, use as Web application’s context root. If the Web application is deployed standalone, application.xml does not come into play and the determination for context-root starts at weblogic.xml and defaults to URI if it is not defined there.
- If context root is not defined in weblogic.xml or application.xmll, then infer the context path from the URI, giving it the name of the value defined in the URI minus the WAR suffix. For instance, a URI MyWebApp.war would be named MyWebApp.
Note:The context-root element cannot be set for individual Web applications in EAR libraries. It can only bet set for Web application libraries.
- replicate session in clustering weblogic v10.3
- weblogic cluster session replicate
- oracle weblogic v10.3 - installation
- oracle weblogic v10.3 - configure JNDI
- reset admin password for weblogic v10.3
- Spring v3.0.2 Learning Note 16 (Cont.)- Resolve NullPointerException on weblogic v10.3
- Clustering/Session Replication HOW-TO
- Mac OS X v10.5.8安装Weblogic 12.1
- weblogic之SESSION复制
- weblogic 集群session复制
- weblogic session问题
- weblogic session 共享
- weblogic集群session复制
- WebLogic之Session
- weblogic session复制
- Weblogic Session总结
- weblogic Session共享
- weblogic.management.ManagementException: The domain edit lock is owned by another session in ...
- AT封闭开发
- How to add shortcut icon
- 从B2C到B4C的革命
- 大学生应该学哪些
- Flex开发技巧:减小SWF体积
- replicate session in clustering weblogic v10.3
- mtk添加资源
- win2003的远程桌面连接端口设置
- 『AlisoftRD』[SD2.0大会]王坚:Data–centric Computing
- matlab调用C文件
- 应用程序-trackbar 播放声音 调用系统时间设定 设定颜色 默认颜色设定 选择文件对话框 动态添加组件
- Batch script to delete file older than N days
- cisco3550交换机的iso的备份与恢复
- DirectX与OpenGL方面的经典电子书下载