ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Closed: (IBATIS-320) When every method call openSession() return same object .
Date Mon, 14 Aug 2006 06:09:16 GMT
     [ http://issues.apache.org/jira/browse/IBATIS-320?page=all ]

Clinton Begin closed IBATIS-320.
--------------------------------

    Fix Version/s: 2.2.0
       Resolution: Fixed

> When every method call openSession() return same object .
> ---------------------------------------------------------
>
>                 Key: IBATIS-320
>                 URL: http://issues.apache.org/jira/browse/IBATIS-320
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: SQL Maps
>    Affects Versions: 2.1.7
>         Environment: windows xp, x86, mysql, eclipse, ibatis 2.1.7.597
>            Reporter: Hoyoung Hwang
>             Fix For: 2.2.0
>
>
> When every method call openSession() return same object .
> i try below code
> ----------------------------------------------
>   Reader reader = Resources.getResourceAsReader("sql-map-config.xml");
>   SqlMapClient client = SqlMapClientBuilder.buildSqlMapClient(reader);
>   SqlMapSession sess1 = client .openSession();
>   SqlMapSession sess2 = client .openSession();
>   if(sess1 == sess2) { // <-- this code return true. 
>          System.out.println("equal");    
>   }
>   sess1.startTransaction();
>   sess2.startTransaction(); // <-- error occure :
>   // error description is  TransactionManager could not start a new transaction.  A transaction
is already started. 
> -------------------------------------------------------------
> this bugs is discussed in mailing lists
> (http://www.mail-archive.com/user-java@ibatis.apache.org/msg04956.html)
> want to have multiple independent transactions in the same thread.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message