-->
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.  [ 3 posts ] 
Author Message
 Post subject: Open Session in View - Error in commit
PostPosted: Tue Oct 03, 2006 11:54 am 
Newbie

Joined: Tue May 09, 2006 4:54 am
Posts: 13
Hello,

We are using Open Session in View pattern in our application. We have been so far successful in using it. But now I am facing following problem.

Since we are committing transaction after doFilter method, the response is rendered for user by the time we commit. Now if we get exception during commit and rollback transaction, I do not know how we can inform the users of this exception.

Can someone please let me know how can we do this?

Thanks

Shantanu


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 03, 2006 12:16 pm 
Newbie

Joined: Thu Sep 21, 2006 12:30 pm
Posts: 2
The page describing the open sesson in view pattern has this caveat:

Quote:
Since the Session is flushed after the view has been rendered, database exceptions might occur after a successful output has been generated. If you use plain JSP and servlets the page output will be rendered into a buffer, usually 8K. If the buffer is full, it is flushed to the client browser! So, your user might see a successful page (200 OK) but in fact an exception occurred. To avoid this, don't render into the servlet engine buffer or increase the buffer size to a safe value. Most web frameworks avoid this issue by not rendering into the standard servlet engine buffer, but into their own.


http://www.hibernate.org/43.html

_________________
Brian Besterman
Walker Digital Gaming, LLC


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 04, 2006 4:36 am 
Newbie

Joined: Tue May 09, 2006 4:54 am
Posts: 13
Thanks for pointing out.

Shantanu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.