Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Posts
    84

    Question Unanswered: Concurrent access to db2 table

    I had a jsp that connects to a DB2 using jdbc connection.
    It is something like:


    > <%@ page isThreadSafe="false" %>
    > ...
    >
    > Connection conn = null;
    > Statement stmt = null;
    > ResultSet rs = null;
    > ...
    >
    > try
    > {
    > synchronized(this)
    > {
    > conn = DriverManager.getConnection(URL, id, pwd);
    > }
    >
    > stmt = conn.createStatement ();
    > rs = stmt.executeQuery(strSQLStmt);
    >
    > } catch (Exception ee)
    > {}


    When there are many concurrent accesses, sometimes A will see the
    result set of B.

    I believe it is due to incorrect way of handling concurrent accesses
    to database. Anyone advice about how to cope with it? Thanks.

  2. #2
    Join Date
    Apr 2002
    Posts
    84

    Concurrent access to db table

    sorry it should be the default value,

    > <%@ page isThreadSafe="true" %>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •