Struts 2中的Java应用程序可以管理多少个会话?

问题描述:

我正在使用事务管理"应用程序,并且正在使用Struts2. 我在内部使用了一个会话来设置和获取

I am working on Transaction Management application, and I am using Struts2. I have used internally a session for setting and getting values like

ActionContext.getContext().getSession().put("string", string);

在应用程序中使用这样的会话是否有限制或不利条件?

Is there any limit or any disadvantage of using a session like this in the application?

限制是计算机物理内存的大小.您不将动态值存储在会话中,因为有人可以同时修改它们,因此仅将这些值存储在会话中表示任何用户特定的数据或静态值(即,在存在会话时不会更改的值).

Limit is the size of your computers physical memory.you dont store dynamic values in session because someone can modify them in the meanwhile , so store only those values in session which represent any user specific data or static values (i.e. which are not going to be changed while session exists).

注意:此处的静态不是静态关键字.

Note : static here is not static keyword .