且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

weblogic + apache 负载均衡与Session

更新时间:2022-09-16 23:24:10

1. 负载均衡
 从{weblogic_home}\server\plugin\win\32 目录,复制mod_wl_22.so 到 {apache_home}\modules目录下
  修改httpd.conf文件,增加如下内容:
  LoadModule weblogic_module modules/mod_wl_22.so
  <IfModule mod_weblogic.c>
   WeblogicCluster 192.168.10.101:7010,192.168.10.102:7011
   MatchExpression *.*
   WLLogFile "D:/Program Files/Apache Software Foundation/Apache2.2/logs/wlproxy.log"
   Debug On
   DebugConfigInfo On
   KeepAliveEnabled On
   KeepAliveSecs 15
</IfModule>

2. Session复制
   
应用中添加weblogic.xml  
<?xml version="1.0" encoding="GBK"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
<sharing-enabled>true</sharing-enabled>
</session-descriptor>
</weblogic-web-app>