You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Mark Nabours (JIRA)" <ib...@incubator.apache.org> on 2005/02/04 05:29:25 UTC

[jira] Created: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
-------------------------------------------------------------------------------------------

         Key: IBATIS-66
         URL: http://issues.apache.org/jira/browse/IBATIS-66
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.0.9    
 Environment: WSAD/WebSphere 5.1, Windows XP Pro
    Reporter: Mark Nabours
 Attachments: SqlMapClientSessionTest.java

Hello,

I have a rather serious problem to which we need a quick resolution.

In brief, the increment method on the Throttle class is being called for
sessions after executing SqlMapClient.setUserConnection()  but the
corresponding decrement method is never being called.  After we reach the
session limit configured in sql-map-config.xml the application hangs hard!

Here are some of the specifics, we are using iBATIS to map data from a
database to our own set of data objects.  However, we are not using iBATIS
to acquire the database connections; we are externally providing them to
the iBATIS SqlMapClient through the setUserConnection method, and we clear
the transaction out by calling setUserConnection and passing null for the
connection.  We have our own connection acquisition code that we use and
therefore we do not even have a transactionManager element configured
within sql-map-config.xml -- we would prefer not to have to configure it
since it requires a data source to be configured and our connection
acquisition code if highly flexible to use different types of connection
ion various environments.  It's my understanding that it is perfectly
acceptable to use iBATIS by providing external connections as long as you
handle all of  your transactional requirements (which we do).

I have attached the following test case  that illustrates the problem.  We
have configured the maximum session count to 75.  Don't read too much into
our test case code as it acquires a single connection and immediately
closes it so that we don't leave the connection open when the test case
freezes.  We loop 80 times and we hang after 75 iterations.

/*
 * Created on Feb 3, 2005.
 */
package com.alliancesys.common.ibatis.testing;

import java.io.Reader;
import java.sql.Connection;
import java.sql.SQLException;

import com.alliancesys.common.jdbc.DatabaseConnectionService;
import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

import junit.framework.TestCase;

/**
 * <code>{@link SqlMapClientSessionTest}</code>
 *
 */
public class SqlMapClientSessionTest extends TestCase {

      private int threadCounter = 0;

      public SqlMapClientSessionTest(String arg0) {
            super(arg0);
      }

      public static void main(String[] args) {
            junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
      }

      private synchronized void writeCount(){
            threadCounter++;
            System.out.println("Thread " + threadCounter + " completed.");
      }

      public void testThrottleSessionLock() throws Exception {

            final Connection connection  =
DatabaseConnectionService.getNewConnection();
            connection.close();
            Reader reader =
                  Resources.getResourceAsReader(
                        getClass().getClassLoader(),
                        "sql-map-config.xml");
            final SqlMapClient sqlMapClient =
SqlMapClientBuilder.buildSqlMapClient(reader);
            for (int i = 0; i < 80; i++) {

                  Runnable runnable = new Runnable() {
                        public void run() {
                              try {
                                    SqlMapClient client = sqlMapClient;
                                    Connection cn = connection;
                                    client.setUserConnection(cn);
                                    client.setUserConnection(null);
                                    writeCount();
                              } catch (SQLException e) {

                                    e.printStackTrace();
                              }
                        }
                  };

                  Thread t = new Thread(runnable);
                  t.start();

            }


      }

}

If you run it, you will notice that if you have max sessions configured to
75 it hangs after completion of the 75 thread.

Our sql-map-config.xml file is as follows:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
http://www.ibatis.com/dtd/sql-map-config-2.dtd">

<sqlMapConfig>

      <properties
            resource="ibatis.properties" />

      <settings
            cacheModelsEnabled="true"
            enhancementEnabled="true"
            maxSessions="75"
            maxTransactions="20"
            maxRequests="140" />

      <sqlMap resource="Contact.xml" />

</sqlMapConfig>

We are hoping that it is a configuration problem, but we suspect that the
decrement method on Throttle needs to be called internally.  

Let me thank you in advance for you help.  iBATIS is an great product, but
this is currently preventing us from moving through QA into production.

Thanks,
Mark Nabours


-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=history ]
     
Clinton Begin closed IBATIS-66:
-------------------------------

      Assign To: Clinton Begin
     Resolution: Fixed
    Fix Version: 2.0.9b


Fixed as per suggested patch.  Thanks again for all of the debugging contributions!

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>     Assignee: Clinton Begin
>      Fix For: 2.0.9b
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Mark Nabours (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=comments#action_58612 ]
     
Mark Nabours commented on IBATIS-66:
------------------------------------

Dasa,

That's a great suggestion for a alternative.  As long as it calls pushSession() all shoud be well.

We actually came up with another alternative.  We have written a Adapter class that implements com.ibatis.sqlmap.engine.datasource.DataSourceFactory.

That class allows us to seemlessly integrate with our DatabaseConnectionService and configure a data source with sql-mqp-config.xml.

Basically, we no longer pass connections in but rather we allow iBATIS to acquire them through our services.  It works great and bypasses this problem.

The alternative that you suggest would certainly be easy to test with the testcase.  But ultimately, I hope the sqlMapClient issue is resolved/patched.

Thanks,
Mark

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Mark Nabours (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=history ]

Mark Nabours updated IBATIS-66:
-------------------------------

    Attachment: SqlMapClientSessionTest.java

Test case illustrating problem.

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Mark Nabours (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=comments#action_58604 ]
     
Mark Nabours commented on IBATIS-66:
------------------------------------

Regarding the uploaded SqlMapExecutorDelegate.java:

This is a proposed patch implemented by my colleague Jeff Roberts.  The added line of code is the pushSession(session); line in setUserProvidedTransaction that ends up decrementing the session counter, and therefore preventing the freeze in Throttle.


public void setUserProvidedTransaction(SessionScope session, Connection userConnection) {
	if (session.getTransactionState() == TransactionState.STATE_USER_PROVIDED) {
		session.recallTransactionState();
	}
	if (userConnection != null) {
		Connection conn = userConnection;
		session.saveTransactionState();
		session.setTransaction(new UserProvidedTransaction(conn));
		session.setTransactionState(TransactionState.STATE_USER_PROVIDED);
	} else {
		session.setTransaction(null);
		pushSession(session);
	}
}

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Mark Nabours (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=history ]

Mark Nabours updated IBATIS-66:
-------------------------------

    Attachment: SqlMapExecutorDelegate.java

This is a proposed patch implemented by my colleague Jeff Roberts.  The added line of code is the pushSession(session); line in setUserProvidedTransaction that ends up decrementing the session counter, and therefore preventing the freeze in Throttle.


public void setUserProvidedTransaction(SessionScope session, Connection userConnection) {
	if (session.getTransactionState() == TransactionState.STATE_USER_PROVIDED) {
		session.recallTransactionState();
	}
	if (userConnection != null) {
		Connection conn = userConnection;
		session.saveTransactionState();
		session.setTransaction(new UserProvidedTransaction(conn));
		session.setTransactionState(TransactionState.STATE_USER_PROVIDED);
	} else {
		session.setTransaction(null);
		pushSession(session);
	}
}

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Dasa Paddock (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=comments#action_58608 ]
     
Dasa Paddock commented on IBATIS-66:
------------------------------------

I haven't tried this, but I was wondering if you've tried the alternative option for supplying your own connection, which is to pass it to sqlMap.openSession(conn), and then use session.close(). In the SqlMapSessionImpl class, the close() method does call delagate.pushSession(session).

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=comments#action_58649 ]
     
Clinton Begin commented on IBATIS-66:
-------------------------------------


This is just a quick note to thank Mark and the others for doing such a great job of working through this problem and offering so many ideas, workarounds and patches.

Such debugging efforts are a huge part of making iBATIS successful.

I also want to apologize for the delay in fixing it.  We're in the middle of moving our source tree to Apache SVN (a huge move), so our source tree has been frozen for two weeks due to some minor operational issues.

Clinton

> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-66) com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang

Posted by "Sridhar Vijendran (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-66?page=comments#action_58637 ]
     
Sridhar Vijendran commented on IBATIS-66:
-----------------------------------------

We are also facing a similar issue in different context. Please refer iBatis-67. Any help is appreciated. Thanks.



> com.ibatis.common.util.Throttle not decrementing Session counter causes application to hang
> -------------------------------------------------------------------------------------------
>
>          Key: IBATIS-66
>          URL: http://issues.apache.org/jira/browse/IBATIS-66
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: WSAD/WebSphere 5.1, Windows XP Pro
>     Reporter: Mark Nabours
>  Attachments: SqlMapClientSessionTest.java, SqlMapExecutorDelegate.java
>
> Hello,
> I have a rather serious problem to which we need a quick resolution.
> In brief, the increment method on the Throttle class is being called for
> sessions after executing SqlMapClient.setUserConnection()  but the
> corresponding decrement method is never being called.  After we reach the
> session limit configured in sql-map-config.xml the application hangs hard!
> Here are some of the specifics, we are using iBATIS to map data from a
> database to our own set of data objects.  However, we are not using iBATIS
> to acquire the database connections; we are externally providing them to
> the iBATIS SqlMapClient through the setUserConnection method, and we clear
> the transaction out by calling setUserConnection and passing null for the
> connection.  We have our own connection acquisition code that we use and
> therefore we do not even have a transactionManager element configured
> within sql-map-config.xml -- we would prefer not to have to configure it
> since it requires a data source to be configured and our connection
> acquisition code if highly flexible to use different types of connection
> ion various environments.  It's my understanding that it is perfectly
> acceptable to use iBATIS by providing external connections as long as you
> handle all of  your transactional requirements (which we do).
> I have attached the following test case  that illustrates the problem.  We
> have configured the maximum session count to 75.  Don't read too much into
> our test case code as it acquires a single connection and immediately
> closes it so that we don't leave the connection open when the test case
> freezes.  We loop 80 times and we hang after 75 iterations.
> /*
>  * Created on Feb 3, 2005.
>  */
> package com.alliancesys.common.ibatis.testing;
> import java.io.Reader;
> import java.sql.Connection;
> import java.sql.SQLException;
> import com.alliancesys.common.jdbc.DatabaseConnectionService;
> import com.ibatis.common.resources.Resources;
> import com.ibatis.sqlmap.client.SqlMapClient;
> import com.ibatis.sqlmap.client.SqlMapClientBuilder;
> import junit.framework.TestCase;
> /**
>  * <code>{@link SqlMapClientSessionTest}</code>
>  *
>  */
> public class SqlMapClientSessionTest extends TestCase {
>       private int threadCounter = 0;
>       public SqlMapClientSessionTest(String arg0) {
>             super(arg0);
>       }
>       public static void main(String[] args) {
>             junit.textui.TestRunner.run(SqlMapClientSessionTest.class);
>       }
>       private synchronized void writeCount(){
>             threadCounter++;
>             System.out.println("Thread " + threadCounter + " completed.");
>       }
>       public void testThrottleSessionLock() throws Exception {
>             final Connection connection  =
> DatabaseConnectionService.getNewConnection();
>             connection.close();
>             Reader reader =
>                   Resources.getResourceAsReader(
>                         getClass().getClassLoader(),
>                         "sql-map-config.xml");
>             final SqlMapClient sqlMapClient =
> SqlMapClientBuilder.buildSqlMapClient(reader);
>             for (int i = 0; i < 80; i++) {
>                   Runnable runnable = new Runnable() {
>                         public void run() {
>                               try {
>                                     SqlMapClient client = sqlMapClient;
>                                     Connection cn = connection;
>                                     client.setUserConnection(cn);
>                                     client.setUserConnection(null);
>                                     writeCount();
>                               } catch (SQLException e) {
>                                     e.printStackTrace();
>                               }
>                         }
>                   };
>                   Thread t = new Thread(runnable);
>                   t.start();
>             }
>       }
> }
> If you run it, you will notice that if you have max sessions configured to
> 75 it hangs after completion of the 75 thread.
> Our sql-map-config.xml file is as follows:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
> http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>       <properties
>             resource="ibatis.properties" />
>       <settings
>             cacheModelsEnabled="true"
>             enhancementEnabled="true"
>             maxSessions="75"
>             maxTransactions="20"
>             maxRequests="140" />
>       <sqlMap resource="Contact.xml" />
> </sqlMapConfig>
> We are hoping that it is a configuration problem, but we suspect that the
> decrement method on Throttle needs to be called internally.  
> Let me thank you in advance for you help.  iBATIS is an great product, but
> this is currently preventing us from moving through QA into production.
> Thanks,
> Mark Nabours

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira