0 Replies Latest reply on Dec 12, 2006 3:12 AM by cuthbe

    handeling multiple writes to Oracle

      All

      I keep getting the following from jboss

      [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@1d889aa
      


      In my class which is a thread off the main program the class connects to a Topic and to the DS and i want to post a new message to the Topic and then write the information to the database so it can be updated later. How do i handel multiple writes to the database without closing the connection.

      ObjectMessage objMsg = (ObjectMessage)message;
      eventMSG = (MonitorMSG)objMsg.getObject();
      // Get DS objects
      InitialContext ctxt = new InitialContext();
      DataSource ds = (DataSource) ctxt.lookup("java:OracleDS");
      conn = ds.getConnection();
      PreparedStatement ps2 = conn.prepareStatement(eventSQL);
      ResultSet rs2 = ps2.executeQuery();
      


      If i push 2 messages through the queue the first one goes into the database and the second one gives me the error above.