Hm... given that you don't use OpenSessionInViewFilter, I think it is
really pretty optimistic to believe your current problem can be solved
by subclassing it and/or changing its flushing behaviour.



On 5/25/06, Mark <[EMAIL PROTECTED]> wrote:
Is there a way to set this in the hibernate.properties?

Right now I do not use OpenSessionInViewFilter...

MARK


Daniel Lydiard wrote:
> Are you using OpenSessionInViewFilter (spring/hibernate)?
>
> The default flushmode is set to NEVER, so you need to override
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
> @Override
>
> protected Session getSession(SessionFactory sessionFactory) throws
> DataAccessResourceFailureException {
>
> Session session = super.getSession(sessionFactory);
>
> session.setFlushMode(FlushMode.AUTO);
>
> return session;
>
> }
>
> @Override
>
> protected void closeSession(Session session, SessionFactory
> sessionFactory) {
>
> session.flush();
>
> super.closeSession(session, sessionFactory);
>
> }
>


---------------------------------------------------------------------
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]

Reply via email to