Best Practice 2 Release HttpSessions when finished

 Best Practice 2 Release HttpSessions when finished

HttpSession都生存在Websphereservlet 引擎中,直到下面的情况发生:

1)、谟τ弥忻魅返氖褂?lt;/SPAN>API来释放它,javax.servlet.http.HttpSession.invalidate ()

这个方法十分常用,图2a提供了一个例子。

2)、在HttpSession的生存期满的时候WebSphere Application Server就会销毁那些已经分配的HttpSession(默认的,1800秒或30分钟)。WebSphere Application Server只能在内存中维护一定数量的HttSeesion对象。在这个限制到达的时候,WebSphere Application Server会将分配的HttpSession序列化到磁盘中,并与之交换。不过在一个高吞吐量的系统中,序列化无用的HttpSession对象的所耗费的资源相当高。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值