All,

I am having problems with a multi threaded server application that uses
a pool of connections that can be shared across threads. It appears
that the sapDB JDBC driver connection is not thread safe. The symptoms
are as follows. If I run a number of server processes I get database related
errors that disappear if I synchronize the database access code on the
connection being used to retrieve data. code snippet below.

   synchronized(connection) {
       resultSet = statement.executeQuery();
       while (resultSet.next()) {
           ...
       }
   }

Am I correct in thinking that the Connection object
is not thread safe ?



Martin Smith
Beansmith Technologies.

Reply via email to