ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Williams <er...@sandiego.com>
Subject RE: Problems with stored procedures
Date Thu, 09 Dec 2004 16:56:10 GMT
Thanks very much for your help, Clinton. Your suggestion worked. Do you have
any information on what the ramifications of using commitRequired are? Are
there any considerations, such as performance? I don't see anything about it
in the documentation.

As to the second problem, that was simply a matter of using "insert" instead
of "queryForObject".

Thanks again for your help!


-----Original Message-----
From: Clinton Begin [mailto:clinton.begin@gmail.com]
Sent: Wednesday, December 08, 2004 5:27 PM
To: Eric Williams
Cc: ibatis-user-java@incubator.apache.org
Subject: Re: Problems with stored procedures

Ahhh....I'm guessing you're calling queryForList or queryForObject and
expecting an update to be done as well.  That's fair.  However, iBATIS
is "smart" in that it only truly commits when you call
insert/update/delete (and is therefore sometimes "dumb").  The
solution in your case would be to use 2.0.8 and set
commitRequired="true" on the <transactionManager> element.  For

<transactionManager type="JDBC|JTA" commitRequired="true"> 


On Tue, 7 Dec 2004 16:26:52 -0800, Eric Williams <ericw@sandiego.com> wrote:
> Hi,
> We're in the process of investigating iBATIS for use in our application.
> really excited about it since we use stored procedures for database
> I'm having a few problems getting up and running, though:
> When I call one of our stored procedures to return a result set, that
> procedure will itself call another procedure to log the operation in a
> logging table. When running the procedure by hand or via JDBC code the log
> entry gets written out. When using iBATIS, it does not. It's as though the
> transaction is being rolled back. I tried controlling the transaction with
> startTransaction, commitTransaction and endTransaction, but had no
> But even though the log entry isn't written, the data is still returned,
> iBATIS creates my objects.
> My second problem involves using stored procedures to perform inserts.
> stored procedures do not return a result set, and I'm able to deal with
> in JDBC code by using executeUpdate instead of executeQuery. With iBATIS I
> get the error: java.sql.SQLException: The executeQuery method must return
> result set. How should I deal with this?
> Thanks very much for any help you can provide!
> Regards,
>         Eric

View raw message