3 Replies Latest reply on Aug 18, 2003 9:24 PM by wisaner

    DB Connection Problem in JBOSS 3.2

    jcorbin4607

      Hello,

      My application uses Informix 5 (no choice) and the latest JDBC driver for Informix.

      Ever since upgrading from 2.4.x to 3.2 my application has been spitting out various errors related to DB connections not being closed and illegal state exceptions on the connection.

      I get the connection not close information exception even in a simple case where I open the connection, execute a query and then immediately close the connection. Why does JBOSS report errors when closing the connection????
      What is equally strange is that it appears to spit out the error during the close connection method is executed.

      That is the first part, I also get a lot of illegal state exceptions on the connection, e.g., attempt to get unregistered connections and others...I have no idea what exactly JBOSS is having issues with.

      Any suggestions or ideas as to why these informational exceptions are occuring would be greatly appreciated. I know I can turn off the logging of these messages but I'd rather figure out what is causing them, then clean em up. As it is, I am concerned about running out of resources if my connections are not getting closed properly.

      Thanks,
      J.D.

        • 1. Re: DB Connection Problem in JBOSS 3.2
          davidjencks

          Please show an example of the code that causes this and a bit of stack trace from "closing connection for you". Please indicate which line of code is causing the error to be thrown. Also please show a little of the illegal state trace.

          • 2. Re: DB Connection Problem in JBOSS 3.2
            sridhargk

            I am using JBOSS 3.2 with Tomcat,I am also getting the same problem,I am using stateless session bean for opening the connection

            public Connection getConnection()

            {



            Connection con = null;

            javax.sql.DataSource ds = null;

            InitialContext ctx=null;



            try

            {



            ctx=new InitialContext();

            ds = (javax.sql.DataSource) ctx.lookup("java:/DB2DS");

            con = ds.getConnection();



            }

            catch(Exception ex)

            {

            debug("PANIC : DataComponent : getConnection - "+ ex);

            }

            finally

            {



            ds=null;

            ctx=null;

            }



            return con;

            }

            i am getting error saying that maximum number of connections to the database...


            can anyone please give a solution to this problem

            • 3. Re: DB Connection Problem in JBOSS 3.2
              wisaner

              could you write your config xml file and more
              code here