WebRequestCycle and Open-session-in-view pattern

2008-04-28 Thread Paolo Di Tommaso
Dear Wicket Gurus,

I'm implementing the Open-session-in-view pattern overriding the
onBeginRequest and onEndRequest method of a custom WebRequestCycle.

Is there any way to avoid to open a new hibernate session for non-view
request, for example resources request (css, javascript, images, etc)
served through the wicket application?

Basically I'm looking for a method to identify requests for static resources
that does not requires n open hibernate session.


Thank you,

// Paolo


Re: WebRequestCycle and Open-session-in-view pattern

2008-04-28 Thread Leszek Gawron

Paolo Di Tommaso wrote:

Dear Wicket Gurus,

I'm implementing the Open-session-in-view pattern overriding the
onBeginRequest and onEndRequest method of a custom WebRequestCycle.

Is there any way to avoid to open a new hibernate session for non-view
request, for example resources request (css, javascript, images, etc)
served through the wicket application?

Basically I'm looking for a method to identify requests for static resources
that does not requires n open hibernate session.


As hibernate guys usually say the session is a lightweight object which 
does not cost much to create. Instantiating a session does not mean a 
database connection is fetched.


--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebRequestCycle and Open-session-in-view pattern

2008-04-28 Thread Igor Vaynberg
create it lazily when it gets requested from the request cycle?

-igor



On Mon, Apr 28, 2008 at 3:36 AM, Paolo Di Tommaso
[EMAIL PROTECTED] wrote:
 Dear Wicket Gurus,

  I'm implementing the Open-session-in-view pattern overriding the
  onBeginRequest and onEndRequest method of a custom WebRequestCycle.

  Is there any way to avoid to open a new hibernate session for non-view
  request, for example resources request (css, javascript, images, etc)
  served through the wicket application?

  Basically I'm looking for a method to identify requests for static resources
  that does not requires n open hibernate session.


  Thank you,

  // Paolo


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]