Weblogic中设置不同方式session共享的weblogic.xml文件的配置

本文探讨了在Weblogic中通过数据库和内存方式实现会话持久化的配置及其实现原理,包括Weblogic Web应用程序配置、会话共享启用、持久存储类型选择等关键信息。

通过数据库方式:

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.7/weblogic-web-app.xsd">
    <wls:weblogic-version>12.1.3</wls:weblogic-version>
    <wls:context-root>Weblogic_jdbc</wls:context-root>
    
<wls:session-descriptor>
   <wls:sharing-enabled>true</wls:sharing-enabled>
   <wls:persistent-store-type>jdbc</wls:persistent-store-type>
   <wls:persistent-store-pool>JDBC_test</wls:persistent-store-pool>
   <wls:persistent-store-table>wl_servlet_sessions</wls:persistent-store-table>
</wls:session-descriptor>
    
    
</wls:weblogic-web-app>


通过内存方式:

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.7/weblogic-web-app.xsd">
    <wls:weblogic-version>12.1.3</wls:weblogic-version>
    <wls:context-root>Weblogic_in_memory</wls:context-root>
    
<wls:session-descriptor>
   <wls:sharing-enabled>true</wls:sharing-enabled>
   <wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>
</wls:session-descriptor>
    
</wls:weblogic-web-app>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值