2 Replies Latest reply on Oct 1, 2003 1:15 AM by frito

    ConnectionClosed Exception JBoss3.2.2rc2

    paulkossler

      Greetings to all,
      I have an SLSB with transactions required. It has several private worker methods which acquire Data from the Oracle8i DB. I cleaned up the DB connection code in this bean so that the container is not closing the connections, which were left open.
      I now get a connection closed exception when I try to use the second Connection object.

      I have the following done:
      SpecCompliant=true in Transaction-service.xml
      Transaction=required in the Deployment descriptor
      The connection object closed and set to null from the previous call.
      (actually the resultset, statement and connection are being fully closed)
      A single JCA DataSource object. (Even if I "get" a new one the object Id's are the same(thus they are the same))
      I have setup a connection pool in the oracle-ds.xml
      (I have not set the TX properties)

      !!! I have looked at the live code with Eclipse in debug, and the connectionClosed flag is false.

      Why am I getting the connecitonClosed event?
      How can I fix it

      Thanx,
      Paul




      I have the latest drivers

        • 1. Re: ConnectionClosed Exception JBoss3.2.2rc2
          paulkossler

          Additional comment, I have tried holding the Connection as a private variable in the SLSB too only use one conneciton for the whole bean. I clean up only the ResultSet and Statement. I still get a ConnectionClosed error when the second method attempts to use the connection.

          Paul

          • 2. Re: ConnectionClosed Exception JBoss3.2.2rc2
            frito

            Just a question, not really an answer to your question:
            since the connections are pooled AND cached, will you really feel a increase of performance with holding the connection in you bean instead of closing everything?

            Greetings,
            Frito