You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by XieCharles <ch...@hotmail.com> on 2009/06/29 15:02:51 UTC

OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

The Spring's OpenSessionInViewFilter has already applied in my struts2 project, and I am about to use the ExecuteAndWaitInterceptor, so I put the OpenSessionExecuteAndWaitInterceptor which extends the struts' original ExecuteAndWaitInterceptor at last of the interceptor stack(see Struts2 cookbook in the wiki). But I found that the 
OpenSessionExecuteAndWaitInterceptor cannot work with the OpenSessionInViewFilter well. Is there any piece of code about how to use these two components correctly?


 


http://charles-xie.spaces.live.com



_________________________________________________________________
上Windows Live 中国首页,下载最新版Messenger!
http://www.windowslive.cn

Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

Posted by Dale Newfield <da...@newfield.org>.
XieCharles wrote:
> I use [...] Hibernate 3.2, and the 
> OpenSessionExecuteAndWaitInterceptor [...] use[s] Hibernate 2:(

The same basic design works with H3.  Have you encountered some specific 
difficulty in updating it to work with H3?

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

Posted by XieCharles <ch...@hotmail.com>.
I use Struts 2.1.6, Spring 2.5.6 and Hibernate 3.2, and the OpenSessionExecuteAndWaitInterceptor is at http://cwiki.apache.org/confluence/display/WW/HibernateAndSpringEnabledExecuteAndWaitInterceptor which is still use Hibernate 2:(



http://charles-xie.spaces.live.com



 

> Date: Tue, 30 Jun 2009 02:02:05 -0400
> From: dale@newfield.org
> To: user@struts.apache.org
> Subject: Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter
> 
> XieCharles wrote:
> > The hibernateandspringenabledexecuteandwaitinterceptor is just the
> > OpenSessionExecuteAndWaitInterceptor I used.
> 
> Which is exactly what you asked for, right?
> 
> BTW, make sure that the version you're using doesn't have the startup 
> race condition. When I was searching to find the URL with which to 
> respond, I found that there are several places still with unpatched 
> versions. (look for a .notify() call -- there's a chance that the 
> background process can be started before its constructor is finished.)
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
打工,挣钱,买房子,快来MClub一起”金屋藏娇”!
http://club.msn.cn/?from=10

Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

Posted by Dale Newfield <da...@newfield.org>.
XieCharles wrote:
> The hibernateandspringenabledexecuteandwaitinterceptor is just the
> OpenSessionExecuteAndWaitInterceptor I used.

Which is exactly what you asked for, right?

BTW, make sure that the version you're using doesn't have the startup 
race condition.  When I was searching to find the URL with which to 
respond, I found that there are several places still with unpatched 
versions.  (look for a .notify() call -- there's a chance that the 
background process can be started before its constructor is finished.)

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

Posted by XieCharles <ch...@hotmail.com>.
The hibernateandspringenabledexecuteandwaitinterceptor is just the OpenSessionExecuteAndWaitInterceptor I used.



http://charles-xie.spaces.live.com



 

> Date: Mon, 29 Jun 2009 13:56:09 -0400
> From: dale@newfield.org
> To: user@struts.apache.org
> Subject: Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter
> 
> XieCharles wrote:
> > the OpenSessionExecuteAndWaitInterceptor cannot work with the 
> > OpenSessionInViewFilter well. Is there any piece of code about how to
> > use these two components correctly?
> 
> http://cwiki.apache.org/WW/hibernateandspringenabledexecuteandwaitinterceptor.html
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全!
http://im.live.cn/safe/

Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

Posted by Dale Newfield <da...@newfield.org>.
XieCharles wrote:
> the OpenSessionExecuteAndWaitInterceptor cannot work with the 
> OpenSessionInViewFilter well. Is there any piece of code about how to
> use these two components correctly?

http://cwiki.apache.org/WW/hibernateandspringenabledexecuteandwaitinterceptor.html

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org