weblogic设置session-timeout超时时间

web . xml


设置 WEB 应用程序 描述符web.xml里的< session -timeout>元素。这个值以分钟为
单位,并覆盖 weblogic .xml中的TimeoutSecs属性
<session-config>
    <session-timeout>54</session-timeout>
</session-config>
此例表示Session将在54分钟后过期
当<session-timeout>设置为-2,表示将使用在weblogic.xml中设置的
TimeoutSecs这个属性值。
当<session-timeout>设置为-1,表示Session将永不过期,而忽略在
weblogic.xml中设置的TimeoutSecs属性值。
该属性值可以通过console 控制台 来设置

2 weblogic.xml

设置WebLogic特有 部署 描述符weblogic.xml的<session-descriptor>元素的
TimeoutSecs属性。这个值以秒为单位
<session-descriptor>
   <session-param>
      <param-name>TimeoutSecs</param-name>
      <param-value>3600</param-value>
   </session-param>
</session-descriptor>
默认值是3600秒

3,jsp中控制

session.setmaxinactiveinterval(7200);

session是默认对象,可以直接引用,单位秒s


4,servlet中控制

httpsession session = request.getsession();

session.setmaxinactiveinterval(7200);

单位秒s

在weblgoic的console中:xxDomain-> Server s->xxServer->Protocols->HTTP 中有一个关于Post Timeout的配置,但这个参数一般使用默认值即可

一般是通过Services-->JDBC-->Connection Pools-->MyConnection(你所建立的连接池名)-->Configration-->Connections 里的Inactive Connection Timeout这个参数来设置的,默认的为0,表示连接时间无限长。你可以设一个时间值,连接超过这个时间值,它会把连接强制放回连接池

<Server AcceptBacklog="62" CompleteHTTPMessageTimeout="480"
CompleteMessageTimeout="480" IdleC
ListenAddress="" ListenPort="7001" Name="myserver"
NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy"
ServerVersion="8.1.4.0">
是否IdleConnectionTimeout参数

看连接池中 高级 选项内的Inactive Connection Timeout和Connection Reserve Timeout时多少, 把这两项设大些试试
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值