to indersand and extensable
service layer.
Anway back to transaction - using this design i have found it better to place
all my transactions here in the service layer.
-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Wed 5/25/2005 4:28 AM
To: ibatis-user-j
Keyzer <[EMAIL PROTECTED]> wrote:
> Sorry to pick this up again, but I still have got one question.
> Wouldn't it be save to always wrap the calls in the service layer to the dao
> layer, in transactions? If this would be the case:
>
>
> accountDao.insertAccount(accou
Sorry to pick this up again, but I still have got one question.
Wouldn't it be save to always wrap the calls in the service layer to the dao
layer, in transactions? If this would be the case:
accountDao.insertAccount(account);
Dao Layer:
public void insertAccount(Account account)
{
u
PROTECTED]
Sent: Tuesday, May 24, 2005 4:22 PM
To: Jason Hall
Cc: ibatis-user-java@incubator.apache.org; [EMAIL PROTECTED]
Subject: Re: transactions
If you do not call start transaction then each update call in the dao
class will be in it's own transaction. This means that you would have
incom
ED]
> Sent: Tuesday, May 24, 2005 4:07 PM
> To: ibatis-user-java@incubator.apache.org; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: transactions
>
>
> Yes, I see. But does that mean that I should put every call to a dao that
> occurs in the service in a transaction?
>
e you
must call startTransaction in the service layer.
-Original Message-
From: Lieven De Keyzer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 24, 2005 4:07 PM
To: ibatis-user-java@incubator.apache.org; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: transactions
Yes, I see. But does
:
> public void insertAccount(Account account)
> {
> update("insertAccount", account);
> }
>
> Would this startTransaction() call still be necessary?
>
> >From: "Jason Hall" <[EMAIL PROTECTED]>
> >Reply-To: ibatis-user-java@incubator.apache.org
>
;
> -Original Message-
> From: Lieven De Keyzer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 24, 2005 3:48 PM
> To: [EMAIL PROTECTED]; ibatis-user-java@incubator.apache.org;
> [EMAIL PROTECTED]
> Subject: Re: transactions
>
>
>
>
> >From: Clinton Begin <[
<[EMAIL PROTECTED]>
Subject: RE: transactions
Date: Tue, 24 May 2005 16:00:11 -0400
if a an error occurs in any of these 3 updates below
> > update("insertAccount", account);
> > update("insertProfile", account);
> > update("insertSignon", account)
[EMAIL PROTECTED]; ibatis-user-java@incubator.apache.org;
[EMAIL PROTECTED]
Subject: Re: transactions
>From: Clinton Begin <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: ibatis-user-java@incubator.apache.org, Brandon Goodin
><[EMAIL PROTECTED]>
>Subject: Re:
From: Clinton Begin <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: ibatis-user-java@incubator.apache.org, Brandon Goodin
<[EMAIL PROTECTED]>
Subject: Re: transactions
Date: Tue, 24 May 2005 13:40:04 -0600
Those update statements ARE in a transaction. But you should
rvice layer?
> I'm just trying to understand the difference.
>
> >From: Brandon Goodin <[EMAIL PROTECTED]>
> >Reply-To: Brandon Goodin <[EMAIL PROTECTED]>
> >To: ibatis-user-java@incubator.apache.org
> >Subject: Re: transactions
> >Date: Tue, 24 May
Those update statements ARE in a transaction. But you should NEVER
manage transactions inside the DAO. The transaction in this case
is taken care of outside of the scope of this particular method (I
believe in this case it is actually an automatic DAO transaction, so
you might not find the calls
Brandon Goodin <[EMAIL PROTECTED]>
>To: ibatis-user-java@incubator.apache.org
>Subject: Re: transactions
>Date: Tue, 24 May 2005 12:45:59 -0600
>
>It is not neccessary to call transactions on only one statement.
>
>Transactions should be handled on the Service layer and m
As great as that tutorial was for iBATIS 1.x, it holds little value for the 2.0 framework.
For one, the new exception handling paradigm is completely different.
Please see the Tutorial available at www.ibatis.com and JPetStore 4.
Cheers,
ClintonOn 5/24/05, Lieven De Keyzer <[EMAIL PROTECTED]> w
It is not neccessary to call transactions on only one statement.
Transactions should be handled on the Service layer and make more
fine-grained calls to the DAO layer.
Brandon
On 5/24/05, Lieven De Keyzer <[EMAIL PROTECTED]> wrote:
> At http://www.reumann.net/struts/ibatisLesson1
At http://www.reumann.net/struts/ibatisLesson1/step6.do
this is an example in a ibatis/struts tutorial
public int update(String statementName, Object parameterObject) throws
DaoException {
int result = 0;
try {
sqlMap.startTransaction();
result = sqlMap.executeUpdate(statem
Subject: Re: ibatis and global transactions
I believe EXTERNAL would be the way for you to go. If you are making
changes against your database that are not completed all at once in a
single connection then you would have to devise a strategy outside of
ibatis to manage that.
Standard IBatis works
Thanks for clarifying. Yes, we do have two separate sqlmaps for each
datasource.
-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 20, 2005 12:48 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: ibatis and global transactions
Sorry, I should be
datasource. All sqlmaps that should use the same JTA would
configure it.
What you can't do is have several datasources defined in ONE sqlmap config.
Depending on how complex your needs are. Sometimes EXTERNAL is better.
This is especially true when you have to maintain transactions a
transactions?
-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 20, 2005 8:19 AM
To: ibatis-user-java@incubator.apache.org
Subject: Re: ibatis and global transactions
You can manage your transactions with EXTERNAL of JTA. I believe that
EXTERNAL is the
You can manage your transactions with EXTERNAL of JTA. I believe that
EXTERNAL is the better route to go in this case. This means that you
will need to configure and manually start and stop your transactions
outside of ibatis. Search the DAO pdf doc and the SQL Maps pdf doc for
external to get
Hi
I working on an application where the services and buisness domain objects are
sitting on a server with ibatis providing the data access layer support.
The clients which are swt client connect to the server and via rpc calls.
Our customer want us to rollback all db changes during a user logi
If you're not using startBatch() - then iBATIS will have JDBC run each one individually ... the batching is something that's driver specific (but supported by JDBC), if I recall correctly. It just adds some efficiency.
Each of your inserts runs at the time they are called (without batching), the co
I am curious as to iBatis batching also. I have a question. From
what you stated below, I am inferring that when you start a
transaction, all inserts/updates/deletes are batched and then sent on
commit? Here is my problem. I need to batch updates and inserts to
multiple tables. So I am doing s
Can you do batch w/ plain JDBC w/o a transaction?On 5/3/05, Simon Brunner <[EMAIL PROTECTED]> wrote:
List,we just started a project from scratch and chose Spring/iBatis/Struts to
build a mid-size J2EE web application. First I've to say that I'm veryimpressed on how fast you get productive by using
List,
we just started a project from scratch and chose Spring/iBatis/Struts to
build a mid-size J2EE web application. First I've to say that I'm very
impressed on how fast you get productive by using iBatis. Everything went
smooth until I wanted to do a batch insert. As we write JUnit testclasses
transactions on the service layer with
something like iBatis DAO or Spring.
Brandon
On 4/14/05, sai nukala <[EMAIL PROTECTED]> wrote:
> I have a basic need of applying transactions.
> What are my options to implement Transactions under this scenario..
>
> My Objects (Just
I have a basic need of applying transactions.
What are my options to implement Transactions under this scenario..
My Objects (Just to give you my an understanding):
>>BaseDAO: Abstract IBatis DAO encapsulating Initialization of SqlMapClient and provides Insert/update/select m
Your approach to transactions isn't going to work in iBATIS, and
likely not any other transactional framework either.
You should be demarcating transactions at a standard level within your
application. If you wish to make this simple on yourself, you could
use Spring, or I could st
@incubator.apache.org
Subject: Question about transactions.
I have a problem. I recently upgraded from the 1.2
iBatis version to the new 2.0 iBatis version. Because
of the database I connect to, I controled transactions
manually. I use the startTransaction method to start
the transaction and commitTransaction to
Thanks Jeff, i knew something of that, but i will
chech that out.
Also, I will add that attribute to the configuration
file and see if it works.
Thanks.
Mark.
The Greatest Thing You'll Ever Learn
It's Just To Love And Be Loved In Return
You probably already know this, but...
Not every AS/400 table automatically supports transactions. If the
table (physical file) is not journalled, then there is no transaction
support. This most often happens with physical files created with DDS
rather than SQL. It can also be the case with
mitTransaction
> > } finally {
> > endTransaciton
> > }
> >
> > Brandon
> >
> > On Fri, 18 Mar 2005 09:18:18 -0800 (PST), Mark
> > Alcocer Flores
> > <[EMAIL PROTECTED]> wrote:
> > > I have a problem. I recently upg
t; } finally {
> endTransaciton
> }
>
> Brandon
>
> On Fri, 18 Mar 2005 09:18:18 -0800 (PST), Mark
> Alcocer Flores
> <[EMAIL PROTECTED]> wrote:
> > I have a problem. I recently upgraded from the 1.2
> > iBatis version to the new 2.0 iBatis vers
TED]> wrote:
> I have a problem. I recently upgraded from the 1.2
> iBatis version to the new 2.0 iBatis version. Because
> of the database I connect to, I controled transactions
> manually. I use the startTransaction method to start
> the transaction and commitTransaction to com
I have a problem. I recently upgraded from the 1.2
iBatis version to the new 2.0 iBatis version. Because
of the database I connect to, I controled transactions
manually. I use the startTransaction method to start
the transaction and commitTransaction to commit it. If
anything went wrong I used the
@incubator.apache.org
Subject: Re: SqlMap transactions
Please post an example of your code.
Brandon
On Fri, 18 Feb 2005 11:23:35 -0500, Akins, Greg <[EMAIL PROTECTED]>
wrote:
>
> It appears that when the first statement executed in a sqlmap
> transaction fails, then the subsequent endTransacti
pdateWare...
int waresUpdated = 0 ;
log.info("*** GAK *** Handling " + avp.getWares().size() + "
wares");
List list = avp.getWares();
for (int i=0;imailto:[EMAIL PROTECTED]
Sent: Friday, February 18, 2005 11:29 AM
To: ibati
Please post an example of your code.
Brandon
On Fri, 18 Feb 2005 11:23:35 -0500, Akins, Greg <[EMAIL PROTECTED]> wrote:
>
> It appears that when the first statement executed in a sqlmap transaction
> fails, then the subsequent endTransaction (called in a catch) fails because
> there isn't a "s
Title: Message
It appears
that when the first statement executed in a sqlmap transaction fails, then
the subsequent endTransaction (called in a catch) fails because there isn't a
"started" transaction?
Is that
correct? If so, is it recommended that I just ignore the SQLException
error th
n e)
> {
> gestionErreur("Erreur liste des serveurs ", e) ;
> }
> finally
> {
> try
> {
> sqlMap.endTransaction ();
> }
> catch(SQLException e)
> {
> ge
eture de transaction ", e) ;
}
}
My transactions are read only transactions. However, I always get the
following message :
[07/01/05 12:20:44:219 CET] 228fdff7 LocalTransact E WLTC0033E: The
jdbc/StatHttp resource was cancelled during the cleaning of a non
resolved LocalTransactionContainment.
[07/01
>>>
I was wondering if caches get cleared once a transaction has failed orhas been rolled back? If not, couldn't they contain invalid entries?As caches seem to be global, what about isolation of differentconcurrent transactions from each other?Oliver
I was wondering if caches get cleared once a transaction has failed or
has been rolled back? If not, couldn't they contain invalid entries?
As caches seem to be global, what about isolation of different
concurrent transactions from each other?
Oliver
45 matches
Mail list logo