Fwd: Re: [Glorp-development] Rollback

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: [Glorp-development] Rollback

Alan Knight-2

X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Wed, 13 Dec 2006 10:24:44 -0500
To: "Mark Plas" <[hidden email]>,
        <[hidden email]>
From: Alan Knight <[hidden email]>
X-magma-MailScanner-Information: Magma Mailscanner Service
X-magma-MailScanner: Clean
X-Spam-Status:
X-Spam-Score: 1.7 (+)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
        See http://spamassassin.org/tag/ for more details.
        Report problems to
         http://sf.net/tracker/?func=add&group_id=1&atid=200001
        1.0 FORGED_RCVD_HELO       Received: contains a forged HELO
        0.2 HTML_TEXT_AFTER_BODY BODY: HTML contains text after BODY close tag
        0.0 HTML_MESSAGE           BODY: HTML included in message
        0.5 HTML_20_30             BODY: Message is 20% to 30% HTML
Subject: Re: [Glorp-development] Rollback
X-BeenThere: [hidden email]
X-Mailman-Version: 2.1.8
List-Id: <glorp-development.lists.sourceforge.net>
List-Unsubscribe: < https://lists.sourceforge.net/lists/listinfo/glorp-development >,
         <[hidden email] >
List-Archive: < http://sourceforge.net/mailarchive/forum.php?forum=glorp-development >
List-Post: <[hidden email]>
List-Help: <[hidden email] >
List-Subscribe: < https://lists.sourceforge.net/lists/listinfo/glorp-development >,
         <[hidden email] >
Sender: [hidden email]
X-pstn-levels:     (S:99.90000/99.90000 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )

You will get an exception, either raised directly by Glorp (e.g. GlorpTransactionFailure, for an optimistic lock conflict) or from the database directly, which is normally going to be wrapped in a GlorpWriteFailure.

You can handle the exceptions, and do whatever you want in the handlers. Glorp will not do a rollback on the failure by default. See GlorpOptimisticLockingTest for some examples of this sort of thing. So in general, yes, it's possible.

At 04:52 AM 12/13/2006, Mark Plas wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
         boundary="----_=_NextPart_001_01C71E9C.685AB9FA"

Hi,
 
This mail is part of a set of glorp questions I have (see some other mails I've sent recently).
 
The question I would like to address here is:
 
What happens with my domain objects & with the Glorp session if I try to commit a unit of work but it fails for some database reason (uniqueness constraint violation for instance)? I would like to avoid that Glorp does a rollback of the domain objects and resets the internal state of the session that keeps track of the changes. I’d rather have the possibility to correct the problem and try to recommit the unit of work again.
 
Is this possible ?
 
Thanks,
Mark
 
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Glorp-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/glorp-development

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Glorp-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/glorp-development

--
Alan Knight [|], Cincom Smalltalk Development

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross