1 Reply Latest reply on Jan 17, 2017 2:08 PM by Cheng Fang

    JDBC Reader/Writer Implementation

    Richard Moore Master

      I was asked to find out how the connection for the JDBC reader and writer function under the covers.

      1. Does the reader connection and writer connection both stay open throughout all the processing? Or are they opened and closed between the reads and writes?
      2. Does the reader share the connection with the writer if they are the same jndi context or do they both have their own connection?
        • 1. Re: JDBC Reader/Writer Implementation
          Cheng Fang Master

          reader connection stays open until the reader is closed.  Writer connection is acquired for each chunk at the time of committing the chunk, and is closed after the current chunk is done.

           

          If reader and writer connections are obtained from the same datasource (by the same jndi name), it means they are from the same connection pool.  But there should be no interferece between the two.  Since the reader keeps its connection, so the writer will not get the same connection as the reader.