struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: [OT] Struts/Hibernate Open Session in View
Date Wed, 04 Mar 2009 08:40:31 GMT
2009/3/3 Burton Rhodes <burtonrhodes@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


Mime
View raw message