[jboss-user] [Beginners Corner] - handeling multiple writes to Oracle

minixman do-not-reply at jboss.com
Tue Dec 12 03:12:33 EST 2006


All 

I keep getting the following from jboss


  | [CachedConnectionManager] Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection at 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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992984#3992984

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992984



More information about the jboss-user mailing list