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.  [ 1 post ] 
Author Message
 Post subject: current-session pattern and StaleObjectStateException
PostPosted: Thu Oct 20, 2005 12:06 am 
Beginner
Beginner

Joined: Wed Sep 28, 2005 5:30 pm
Posts: 25
Hi,

Looking at the current-session design here: http://www.hibernate.org/42.html it seems to me it cannot handle retries on StaleObjectStateException.

To my understanding, if I wanted to retry the operation on StaleObjectStateException, I'd have to rollback the current transaction and session, open a new session and transaction and re-execute the servlet. The problem is that there is no way for me to invoke the Servlet a second time with the original ServletRequest/ServletResponse objects. If the servlet uses ServletRequest.getInputStream() -- as mine does -- the stream is "used up" by the first run.

The only way I can think of making this work is making the servlet do some session management; but doesn't this defeat the entire purpose of the "current-session" design (i.e. we're trying to hide Session management)?

Any ideas would be most welcome.


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

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.