2 Replies Latest reply on Dec 2, 2003 8:44 PM by markmatthews

    Temporary tables - _really_ close connections

    hoefel Newbie

      Hi *,

      I would like to use temporary tables. But the problem is that due to the connection pool I cannot close the db connection to do the clean up. (I really mean close, not only mark them as closed)

      In 95% of the cases I need to use the temporary tables I'm able to do the clean up by myself, but there are some circumstances I'm not and closing the db connection would be very handy.

      Just for the background what I'm doing.
      - I want to process several different SQL statements. Some of them create temporary tables.
      - In some cases processing of these statements might get aborted and cannot be finished. So clean up work that is sceduled at the end cannot be executed.
      - I'm using a UserTransaction from the SessionContext to get this all done with one single db connection
      - I'm using MySQL 4.1 and JBoss 3.2.1

      So, does anybody has any idea how to close a db connection that is managed in the connection pool. Or is there any way to somehow flush the connection to clean up the temporary tables?