title: Hitting some limit under z/OS with DB2 Connect JDBC t4 driver
body: <p>We have an application connecting to DB2 under z/OS and, after a while, there seems to be some resource limit being hit on the mainframe side. Since we're using BIRT, it seems the only control we have over the JDBC code is with stanzas in the URL itself. we don't have direct Java control over the connection or statements (except for the SQL itself of course) although it may be possible by using Javascript within the report design. So we can turn on debugging with something like:</p>
  
  <pre><code>jdbc:db2://machine.com:1234/INSTANCE:traceFile=c:/db2.txt;traceLevel=-1;
  </code></pre>
  
  <p>Eventually the application using JDBC will simply stop and no more data will be written to the log file. Doing a <code>TSO NETSTAT</code> on the mainframe shows about 50 sessions in <code>ESTABLISHED</code> state.</p>
  
  <p>Now we know this is a problem on the mainframe side since, when it happens, <em>no</em> JDBC connection to that instance will work (from <em>any</em> client). At that point, we have to restart the database to continue.</p>
  
  <p>I've googled quite a lot of stuff, some of which seems to indicate that you may need to commit <em>queries</em> before you close a session. It may be that the sessions may be being held open because there's something wrong in the BIRT close code (at least in terms of what DB2 expects).</p>
  
  <p>Has anyone experienced anything like this before? How did you fix it (if at all)? Is there a way to solve it by using just the JDBC URL stanzas or Javascript code within the report design?</p>
  
  <p>FWIW, we're using DB2 9.1 and BIRT 2.2.1.</p>