I wouldn't have any concerns about performances. An empty hibernate session
is lightweight. We did originally consider not opening hibernate sessions
for some pages but the impact on performances was so low that we did not
bother doing anything like that. What does matter on the performance side
however is to close the sessions or at least flush them. If you follow the
spring opensessioninview filter code, it will handle that for you.

Ideally it would be nice to have an annotation in the page class to say that
you need a hibernate session or not... but the framework can't handle it
completly transparently because some apps implement long sessions that span
over several requests... it is up the the app to define the session
strategy.

Also creating sessions on demand wouldn't too difficult either to implement,
but hibernate is smart enough with the sessions so that it doesn't require
much resources to create one. All db connections and everything else would
be handled on the first db access. What does have more an impact on
performance is the hibernate cache. Definitly worth to spend time fine
tuning it, on our website, most requests don't even require any db access.





On 8/22/06, hv @ Fashion Content <[EMAIL PROTECTED]> wrote:

I have the same concerns, but for some reason few people care to make the
creation and closing of a session depend on actual use.
Relating it to the page name is a weak solution imo. It should be a
concern
handled strictly and transparently by the persistence framework
(provided that you define the servlet filter of course).

Henrik

"Vinicius Carvalho" <[EMAIL PROTECTED]> skrev i en meddelelse
news:[EMAIL PROTECTED]
> Well I guess, I'm just worried about performance, those page will
> handle a few thousands of concurrent users, and they use ajax, we
> expect something like 500-700 simultaneous requests for the pages.
>
> Best regards
>
> On 8/22/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
>> Do you really need to turn it off?
>> It shouldn't hurt to have it on even if you don't need an hibernate
>> session.
>>
>>
>>
>> On 8/22/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:
>> >
>> > Hello there! I'm using OSIVF with spring in my app. I had it
>> > configured just like examples on the wiki:
>> >
>> > <filter-mapping>
>> >        <filter-name>hibernateFilter</filter-name>
>> > <url-pattern>/app</url-pattern>
>> >
>> > But I have a few pages that I want to turn it off, is it possible? I
>> > tried before using pattern=*.html and put those pages in a different
>> > path, but I get some errors using *.html.
>> >
>> > Best Regards
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>>
>> --
>> Henri Dupre
>> Actualis Center
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




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




--
Henri Dupre
Actualis Center

Reply via email to