Eugeny,
make sure you are using a table type which supports transactions such as
InnoDB.
A statement like below can show you which type/engine you are using
show create table ;
it outputs the following:
CREATE TABLE (
...
) Type=InnoDB ... ;
(or ENGINE=InnoDB for MySQL 4.1).
If the type i
Hi
I'm trying to rollback the transaction with SqlMapClient.
the source looks like
client.startTransaction();
//some insert/select calls
client.endTransaction();
the inserted data remains in the table, but is shouldn't (it's unit-test)
there is MySQL at the backend.
Any ideas?
--
Eugene N Dzhur
I am getting a preparation falied "UndeclaredThrowableException" when I
call:
return (Integer) executeQueryForObject("getTaxable", item);
The SQL Map is:
SELECT count(1) as value FROM ecrs_v_InventoryMaster, ecrs_TaxMain,
ecrs_StockInventoryLinkTax WHERE ecrs_v_InventoryMaster.INV_PK =
ec
Was not aware of this Larry -Thanks. Will try your solution.
Just a thought. If you do use 'SELECT LAST_INSERT_ID()' and
two tables have been auto-incremented which ID does it return?
Alan.
"Learn something NEW everyday"
On Wed, 17 Aug 2005 22:46:19 +0100, Larry Meadors
<[EMAIL PROTECTED]>
A somewhat related question...
We are using Stateless Session beans for transaction management. In this case,
is it still a good idea to code 'daoManager.startTransaction' and other
transaction-related methods as described in the code in the previous mail? We
use an XA jdbc driver as there are
Oops, i only replied to salim...
-- Forwarded message --
From: Larry Meadors <[EMAIL PROTECTED]>
Date: Aug 17, 2005 4:35 PM
Subject: Re: where can I find a simple implementation example
To: Salim Madjd <[EMAIL PROTECTED]>
On 8/17/05, Salim Madjd <[EMAIL PROTECTED]> wrote:
> > How
NO! That is really, really not thread safe!
Imagine what happens when 2 ppl do inserts at the same time...
[insert #1][insert #2][query #1][query #2]
Both [query #1] and [query #2] return the same id.
Ooops! kaboom!
Larry
On 8/17/05, Alan Hicks <[EMAIL PROTECTED]> wrote:
> Hi Brian,
>
> I h
Hi Brian,
I had the same problem and could not find any working examples. Finally I
stumbled upon
the query where 'userId' is an auto-generated key in my mysql table. If
you replace the
query you have with this one you should be in business.
SELECT MAX(userId) FROM tb_user
Hope this help
M$SQL to MySQL?! Good for you!
SELECT LAST_INSERT_ID()
Larry
PS: I'd use pgsql instead though. ;-)
On 8/17/05, Barnett, Brian W. <[EMAIL PROTECTED]> wrote:
> We've been using SQL Server and are moving to mySQL. Can somebody tell me
> how to do this for mySql:
>
>
> SELECT @@IDENTITY
Hi,
I'm facing this exact same problem however in a somewhat different
context, see the following archived thread:
http://www.mail-archive.com/ibatis-user-java@incubator.apache.org/msg025
80.html
http://www.mail-archive.com/user-java@ibatis.apache.org/msg00036.html
I recently restarted my inves
We've been using SQL Server and are moving to mySQL. Can somebody tell me
how to do this for mySql:
SELECT @@IDENTITY AS id
TIA,
Brian Barnett
This email may contain confidential material.
If you were not an
On 8/17/05, Salim Madjd <[EMAIL PROTECTED]> wrote:
> Thanks, Larry.
>
> Yes, I have gone this far and have all the config and maps setup based on
> the documentations.
>
> Your example is great for stand-alone application. But I am looking for web
> application (tomcat 5.x and above or any
Thanks, Larry.
Yes, I have gone this far and have all the config and maps setup based on the documentations.
Your example is great for stand-alone application. But I am looking for web application (tomcat 5.x and above or any servlet 2.3 container) and some best practices.
For example, where sh
Prashanth,
Thanks for your email. I had already looked at the petstore. And as I said in my email I am looking for a simple example that does NOT include strut or spring.
I was hoping to find a simple example without the involvement of strut and spring. Using petstore as an example it forces any
This is as simle as it can possibly get:
http://www.mail-archive.com/ibatis-user-java@incubator.apache.org/msg01759.html
Larry
On 8/17/05, Prashanth Sukumaran <[EMAIL PROTECTED]> wrote:
> IBatis PetStore.
>
> http://ibatis.apache.org/petstore.html
>
> --- Salim Madjd <[EMAIL PROTECTED]> wrote
What are some good options to deal with the following:
ServiceClass1
public void doSomething() {
try {
daoManager.startTransaction();
// Write some stuff to a database
daoManager.commitTransaction();
} catch (Exception e) {
In a previous message, Prashanth Sukumaran wrote:
>
> When executing in batch mode i do this.
>
> try {
> startTransaction();
>
> startBatch();
> for (int i = 0; i < dealerFrLines.length; i++) {
> param.put("dealerFrLines", new Integer(dealerFrLines[i]));
>
IBatis PetStore.
http://ibatis.apache.org/petstore.html
--- Salim Madjd <[EMAIL PROTECTED]> wrote:
> Hi,
> I have read a lot of documentations and I still can not put the whole thing
> together, yet.
> I just want to see a simple implementation using servlet or jsp directly
> without involvin
Hi,
I have read a lot of documentations and I still can not put the whole thing together, yet.
I just want to see a simple implementation using servlet or jsp directly without involving strut or spring. I like to see a simple jsp page displaying a select statement and the jsp page displaying foo
It will be indeed very handy to have list
insert/update/delete/statement methods.
And it even seems quite natural to have
queryForObject - queryForList
insert- insertList(String statementName, List list) etc.
Koka
Will this still work the same with
DaoManagerBuilder.buildDaoManager(reader, props);
We do not explicitly call SqlMapClientBuilder.buildSqlMapClient
(configReader,properties). I assume that the DAO Manager calls it.
And if this is the case with the props in the first line above be
passed t
Hi Eric,
Sometimes it is not good to advice people when you don't know it fully
yourself. But this is how
i would do.
In normal JDBC i would achieve this by batchInsert. Similar is the case with
iBatis.
When executing in batch mode i do this.
try {
startTransaction();
start
First of all, thanks for developing iBATIS! It's very slick!
Perhaps I'm missing something, but I've been unable to find any
information about this question. I've searched through the
documentation and posts to the mailing list and I'm surprised this
question hasn't been asked yet: is it possi
23 matches
Mail list logo