-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Configuring FlushMode
PostPosted: Fri Jul 27, 2007 6:06 pm 
Newbie

Joined: Fri Jul 27, 2007 12:31 pm
Posts: 1
Location: New York, NY, USA
I'm working on a Spring / Hibernate application and because of the way the server side processes requests, I need to set the session's flush mode to COMMIT.

This works perfectly if I set the flush mode programatically (i.e. in Java at runtime).

I was looking for a way to set this property in the configuration, to keep these details out of the code. I don't see a way to do this.

Is this property only set-able at runtime on the Session?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 29, 2007 4:46 pm 
Newbie

Joined: Tue Jul 17, 2007 9:05 am
Posts: 9
Hello,
if I understand properly, you want to flush the session without making a call to session.flush() every time inside your java code.
I had the same problem, and I solved is using Spring and Aspect Oriented Programming. An aspect carrying the "session.flush" instruction was automatically called before processing each DAO call.

Michael.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.