You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lennart Benoot <le...@chronoline.org> on 2006/01/20 08:20:23 UTC

session-per-request / conversation?

Hi Tapestronians,

After a year of programming on a pernonal web project, I found that the time has come to do some refactoring. One of the subsystems that really need to be looked at is hibernate.  I'm trying to decide on a pattern. 

I was thinking about finding some inspiration in kickstart but I came across this :
>It has proven suitable for low to medium load (some 100 concurrent users) web-apps typically >found on corporate extranets. It's characteristics are...

Is session-per-request typically capable of handling higher loads?

Does anybody have an example implementation of session-per-request? Or, where can do the creation and the closing of the session best in tapestry. I dit found a class on the Hibernate site that provides the functionality to manage the sessions (create, get, close) per thread.
And, by the way, if you would use non-blocking IO such as in Jetty, what would the impact be? Failure probably.

Thanks,
Lennart 



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


Re: session-per-request / conversation?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I use session per request with hibernate, and I think it's safe to assume
that this will become more generally available once Marcus(from kickstart)
and I are done merging our implementations a more flexible pattern choosing
facility will be available.

Hivemind does really make it easy for you. The basic premise is that if you
create Factory service based around SessionFactory, that is invoked by a
threaded service (one implementing Session), your threads are already
magically bound to the web request for you.

I will send you a link to the project offline if you want.

On 20 Jan 2006 07:20:23 -0000, Lennart Benoot <le...@chronoline.org>
wrote:
>
>
> Hi Tapestronians,
>
> After a year of programming on a pernonal web project, I found that the
> time has come to do some refactoring. One of the subsystems that really need
> to be looked at is hibernate.  I'm trying to decide on a pattern.
>
> I was thinking about finding some inspiration in kickstart but I came
> across this :
> >It has proven suitable for low to medium load (some 100 concurrent users)
> web-apps typically >found on corporate extranets. It's characteristics
> are...
>
> Is session-per-request typically capable of handling higher loads?
>
> Does anybody have an example implementation of session-per-request? Or,
> where can do the creation and the closing of the session best in tapestry. I
> dit found a class on the Hibernate site that provides the functionality to
> manage the sessions (create, get, close) per thread.
> And, by the way, if you would use non-blocking IO such as in Jetty, what
> would the impact be? Failure probably.
>
> Thanks,
> Lennart
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

Re: session-per-request / conversation?

Posted by Yunfeng Hou <ho...@yahoo.com>.
I use
net.digisys.common.spring.hibernate.HibernateSessionFilter
to manage the hibernate session. It will open a
session before tapestry process the process, and will
close the session after tapestry rendering. 
According to Gavin, session is a lightweight object,
so it is safe to generate and destroy for each
request.


Yunfeng Hou

--- Lennart Benoot <le...@chronoline.org> wrote:

> 
> Hi Tapestronians,
> 
> After a year of programming on a pernonal web
> project, I found that the time has come to do some
> refactoring. One of the subsystems that really need
> to be looked at is hibernate.  I'm trying to decide
> on a pattern. 
> 
> I was thinking about finding some inspiration in
> kickstart but I came across this :
> >It has proven suitable for low to medium load (some
> 100 concurrent users) web-apps typically >found on
> corporate extranets. It's characteristics are...
> 
> Is session-per-request typically capable of handling
> higher loads?
> 
> Does anybody have an example implementation of
> session-per-request? Or, where can do the creation
> and the closing of the session best in tapestry. I
> dit found a class on the Hibernate site that
> provides the functionality to manage the sessions
> (create, get, close) per thread.
> And, by the way, if you would use non-blocking IO
> such as in Jetty, what would the impact be? Failure
> probably.
> 
> Thanks,
> Lennart 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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