-->
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: How to "checkpoint" - avoid double charging credit
PostPosted: Sat Mar 08, 2008 12:44 am 
Newbie

Joined: Mon Sep 11, 2006 3:38 pm
Posts: 9
I am aware of http://hibernate.org/42.html

I have a web application which does complex stuff, charges a credit card via SOAP, does more complex stuff. If the second batch of complex stuff gets an exception the transaction is rolled back... and I have a problem. All record of making the payment will be gone. Next time through, the same card will be double charged.

How is this typically handled with hibernate? Do I get the underlying session and close/flush it? Will a new session magically open up? I don't see much hibernate API level stuff that relates to closing and opening a session mid stream.

In my case the backend is postgres/jdbc run under tomcat. The webapp is under xwork. And there is a session wrapped around everything -- which was recently fixed to actually work (before sessions were not in fact rolled back on a java exception).

Thus, the problem.

_________________
http://www.citycarshare.org/


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.