OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

View: New views
6 Messages — Rating Filter:   Alert me  

OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

by XieCharles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

by DNewfield :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: user-help@...


RE: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

by XieCharles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
> To: user@...
> 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@...
> For additional commands, e-mail: user-help@...
>

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

Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

by DNewfield :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: user-help@...


RE: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

by XieCharles :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
> To: user@...
> 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@...
> For additional commands, e-mail: user-help@...
>

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

Re: OpenSessionExecuteAndWait vs. OpenSessionInViewFilter

by DNewfield :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: user-help@...