473,383 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Best practices: commit by database layer vs. commit by caller

All,

What's the accepted best practice for persisting data? Commit by the
PL/SQL or commit by the caller (C#, Java, VB, etc.). I believe that
if the caller starts a transaction and calls PL/SQL that contains
commit/rollback that the XA Manager throws an exception. Since I
can't predict what the caller of my PL/SQL could do, I'm leaning
towards having the caller handle the transaction as a precondition of
calling into the database layer.

Comments are appreciated.

Matt Houseman
Jul 19 '05 #1
1 3506
"Matthew Houseman" <mh******@ix.netcom.com> wrote in message
news:73**************************@posting.google.c om...
All,

What's the accepted best practice for persisting data? Commit by the
PL/SQL or commit by the caller (C#, Java, VB, etc.). I believe that
if the caller starts a transaction and calls PL/SQL that contains
commit/rollback that the XA Manager throws an exception. Since I
can't predict what the caller of my PL/SQL could do, I'm leaning
towards having the caller handle the transaction as a precondition of
calling into the database layer.

Comments are appreciated.

Matt Houseman


Unless the entire pl/sql procedure is a transaction I would have the caller
set the transaction boundries. Then the expectation of what do do with
exception handling is clearer. Caller gets the exception and determines what
to do (rollback, retry, commit, ask the user something, log it etc.).
Jim
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hugh McLaughlin | last post by:
Hello Everyone and thanks for your help in advance. I have read a great deal about code reuse and the development of the three-tier application, but am somewhat confused on some issues and am...
16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
3
by: Mark | last post by:
If a java applicaiton using the type 4 driver calls a DB2 stored procedure, does the stored procedure need to do its own commit when updates are completed? If the stored procedure does a commit or...
6
by: Nate | last post by:
I am in a slight predicament trying to determine the most efficient and effective way to connect/disconnect from a database within a business object (c# dll). I'm also keeping in mind the concept...
4
by: Tarun Mistry | last post by:
Hi all, I have posted this in both the c# and asp.net groups as it applies to both (apologies if it breaks some group rules). I am making a web app in asp.net using c#. This is the first fully OO...
3
by: cbrown | last post by:
I am rebuilding an existing application that relies on an SQL DB. The app is a scheduling/employee management program. My question pertains to best practices in dotnet and database. I use a 3...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
24
by: Earl | last post by:
I have all of my data operations in a separate library, so I'm looking for what might be termed "best practices" on a return type from those classes. For example, let's say I send an update from...
1
by: Matthew Houseman | last post by:
All, What's the accepted best practice for persisting data? Commit by the PL/SQL or commit by the caller (C#, Java, VB, etc.). I believe that if the caller starts a transaction and calls...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.