No, it does not use streams.
In fact, if some other thread uses an instruction, and then another thread calls executeUpdate (), then the other ResultSet s thread, if any, will be closed. JavaDoc for java.sql.Statement (of which PreparedStatement is a subtype) "All execution methods in the Statement interface implicitly close the current ResultSet if one exists."
In addition, it is unlikely that this implementation of executeUpdate() will be written as safe for mulit-thread.
You must either synchronize all operator usage and result sets, or make multiple connections so that each thread uses its own JDBC Connection in the database. I would recommend the latter.
jbindel
source share