Thread:
 Transaction Management in DAOs 
 prashantbasawa   30 Oct 2006, 06:25 
 Re: Transaction Management in DAOs 
 prashantbasawa   30 Oct 2006, 07:28 
 Re: Transaction Management in DAOs 
 bora.erbas   03 Nov 2006, 08:29 
 Re: Transaction Management in DAOs 
 prashantbasawa   13 Nov 2006, 02:12 
 Re: Transaction Management in DAOs 
 christian   14 Nov 2006, 05:19 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: prashantbasawa (13 Nov 2006, 02:12) Replies: 1, Views: 23524
Subject: Re: Transaction Management in DAOs
POST QUESTIONS ON THE FORUM! COMMENTS HERE SHOULD ADD VALUE TO THE
PAGE!On 03 Nov 2006 08:29, bora.erbas wrote:

>so you basically mean; for every operation like persisting an object,
>there should be a transaction began and committed? right?
>i thought this was not a good idea...

How many operations are you going to have for persisting ? Only 3,
INSERT, UPDATE and DELETE which you can implement in a super class. So
there is no replication of code. Only things that vary for DAOs are the
way you query (SELECT) the respective tables, I don't thing u should use
transaction begin-commit for selecting rows of data where u r not making
changes to database. 

I hope this answers ur doubt.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]