When every method call openSession() return same object .
---------------------------------------------------------

         Key: IBATIS-320
         URL: http://issues.apache.org/jira/browse/IBATIS-320
     Project: iBatis for Java
        Type: Bug

  Components: SQL Maps  
    Versions: 2.1.7    
 Environment: windows xp, x86, mysql, eclipse, ibatis 2.1.7.597
    Reporter: Hoyoung Hwang


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

Reply via email to