读书人

Struts2 amp; Servlet 线程生命周期小懂

发布时间: 2012-07-01 13:15:00 作者: rapoo

Struts2 & Servlet 线程,生命周期小理解

?????????????????????????????????????????? Servlet?????????????????????????????????????????????????????? Struts2

??????????????????? init????????????????? when the request arrive???????????????????? when the request arrive

lifecycle??????? service??????????? exist in container??????????????????????????????? exist in container??

??????????????????? destroy?????????? by container??????????????????????????????????????? request thread destroy

?

?

thread???????????????????????????????? exist in container all request?????????????? ActionContext is thread local

??????????????????????????????????????????? share the same servlet ,???????????????????? each thread have a ActionContext

??????????????????????????????????????????? thread-unsafe????????????????????????????????? ? thread-safe

读书人网 >开源软件

热点推荐