-->
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: adminapp flush and commit
PostPosted: Thu Feb 19, 2004 4:12 pm 
Newbie

Joined: Sun Oct 26, 2003 4:46 pm
Posts: 16
Location: Tallinn, Estonia
Hello,

I was browsing the sources of adminapp and I found this thing that I really cannot understand.

The HibernateInterceptor takes care of commiting the transactions. The flush() happens then inside Transaction.commit(). I think that flush() and commit() are the places where most database-related exceptions occur. However just as you say in the comments, the interceptor's cleanup is run after the view is rendered. Therefore it seems like the client gets a successful response and we are unable to tell him that something actually went wrong? But then again what is the point of returning Action.ERROR to the from the HibernateInterceptor.intercept() if the view is already rendered?

Please correct me if I have misunderstood something.

_________________
best regards,
erik


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 19, 2004 4:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
But then again what is the point of returning Action.ERROR to the from the HibernateInterceptor.intercept() if the view is already rendered?


No point, I think WW ignores the return value.


We have discussed this among ourselves. I think the best place to put the flush() is actually in a pre-result interceptor.


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.