Click here to Skip to main content
16,007,111 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Ye olde "top-down" versus "bottom-up" debate Pin
Member 9630-Apr-08 7:00
Member 9630-Apr-08 7:00 
GeneralRe: Ye olde "top-down" versus "bottom-up" debate Pin
Megidolaon11-Jun-08 4:19
Megidolaon11-Jun-08 4:19 
QuestionLooking for architectures that avoid GPL contamination Pin
Fred Garvin15-Apr-08 17:18
Fred Garvin15-Apr-08 17:18 
GeneralRe: Looking for architectures that avoid GPL contamination Pin
Roger Alsing16-Apr-08 22:17
Roger Alsing16-Apr-08 22:17 
GeneralRe: Looking for architectures that avoid GPL contamination Pin
Pete O'Hanlon17-Apr-08 2:26
mvePete O'Hanlon17-Apr-08 2:26 
GeneralRe: Looking for architectures that avoid GPL contamination Pin
Moak21-Apr-08 16:30
Moak21-Apr-08 16:30 
GeneralRe: Looking for architectures that avoid GPL contamination Pin
Mark Churchill1-May-08 17:25
Mark Churchill1-May-08 17:25 
GeneralPattern for handling an ADO.net transaction Pin
PIEBALDconsult14-Apr-08 9:58
mvePIEBALDconsult14-Apr-08 9:58 
I've been using the following pattern with transactions for some time now, without problems.

try
{
    // begin transaction
    // do stuff
    // Commit
}
catch ( System.Exception err )
{
    // log err
    // Rollback
}


I have been operating under the assumption that if Commit or Rollback is called for a non-existent transaction, then throwing an exception is the right thing to do. The Commit and Rollback in question are my methods that check for null and throw InvalidOperationException rather than NullReferenceException.

But recently I've run into some problems. For some reason (which I still need to investigate further, but I have an idea) the Commit fails because the transaction doesn't exist, which means the Rollback will also fail. Having an exception thrown through the catch is, of course, nasty.

I could change the methods to raise an event instead of throwing.

I could filter the exception to log but not rollback on certain exceptions (like InvalidOperationException).

Has anyone else had to deal with this situation?
Does anyone have a better pattern for this?
GeneralRe: Pattern for handling an ADO.net transaction Pin
Pete O'Hanlon14-Apr-08 10:50
mvePete O'Hanlon14-Apr-08 10:50 
GeneralRe: Pattern for handling an ADO.net transaction Pin
PIEBALDconsult14-Apr-08 17:06
mvePIEBALDconsult14-Apr-08 17:06 
GeneralSkipjack and RC5 Pin
Cryptogrpahy11-Apr-08 20:25
Cryptogrpahy11-Apr-08 20:25 
GeneralRe: Skipjack and RC5 Pin
supercat927-May-08 15:45
supercat927-May-08 15:45 
GeneralHey! There's a design and architecture message board... Pin
Member 9611-Apr-08 8:31
Member 9611-Apr-08 8:31 
GeneralRe: Hey! There's a design and architecture message board... Pin
Pete O'Hanlon11-Apr-08 10:31
mvePete O'Hanlon11-Apr-08 10:31 
GeneralRe: Hey! There's a design and architecture message board... Pin
Member 9611-Apr-08 11:31
Member 9611-Apr-08 11:31 
QuestionDesign Coaching Needed - I'm in over my head Pin
Wauna11-Apr-08 6:32
Wauna11-Apr-08 6:32 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
rockNroll11-Apr-08 15:09
rockNroll11-Apr-08 15:09 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Wauna11-Apr-08 16:16
Wauna11-Apr-08 16:16 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Leslie Sanford12-Apr-08 19:23
Leslie Sanford12-Apr-08 19:23 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Wauna14-Apr-08 11:56
Wauna14-Apr-08 11:56 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Pete O'Hanlon17-Apr-08 2:27
mvePete O'Hanlon17-Apr-08 2:27 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
ghle17-Apr-08 16:10
ghle17-Apr-08 16:10 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
Wauna18-Apr-08 3:39
Wauna18-Apr-08 3:39 
GeneralRe: Design Coaching Needed - I'm in over my head Pin
ghle18-Apr-08 3:52
ghle18-Apr-08 3:52 
JokeRe: Design Coaching Needed - I'm in over my head Pin
ghle18-Apr-08 4:06
ghle18-Apr-08 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.