You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Burton Rhodes <bu...@gmail.com> on 2009/03/03 19:26:00 UTC

[OT] Struts/Hibernate Open Session in View

Has anyone had issues with the scalability of hibernate's recommended
OSiV pattern?  I am upgrading my struts app from 5 users to handle
1000+ users and I am curious if I should avoid this pattern for the
upgrade. I have heard some have had performance issues but I am not
sure at what point this becomes an issue.

-- 
Sent from my mobile device

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


Re: [OT] Struts/Hibernate Open Session in View

Posted by Antonio Petrelli <an...@gmail.com>.
2009/3/3 Burton Rhodes <bu...@gmail.com>:
> Has anyone had issues with the scalability of hibernate's recommended
> OSiV pattern?  I am upgrading my struts app from 5 users to handle
> 1000+ users and I am curious if I should avoid this pattern for the
> upgrade. I have heard some have had performance issues but I am not
> sure at what point this becomes an issue.

AFAIK the problem is the double submit: for instance, if an object is
in HTTP session, it might be attached to two Hibernate sessions,
causing an exception.
If you are putting an Hibernate-loaded object, you should detach it
first and reattach when you need to save it.
However, about performances, I don't think it causes a performance
problem, since opening a Hibernate session does not get a connection
immediately (only when needed), it's only a way to ease programming.

Ciao
Antonio

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