Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1466

Network Server should flush the PrintWriter after console output

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.2.1
    • 10.1.3.2
    • Network Server
    • None

    Description

      If Network Server is started with a PrintWriter specified for console output it will not automatically flush output such as starting the server. This can be confusing as the console output shows no activity.

      Users currently need to specify the PrintWriter to autoflush e.g.
      starterWriter = new PrintWriter(new FileOutputStream(new File(SERVER_START_LOG)),true);

      derbyServer = new NetworkServerControl();
      derbyServer.start(starterWriter);

      For repro see:
      http://www.nabble.com/Questions-about-Network-Server-API-Behavior-p5055814.html

      And change the following line in the program to not autoflush as follows:
      starterWriter = new PrintWriter(new FileOutputStream(new File(SERVER_START_LOG)),false);

      Attachments

        1. derby1466.stat.txt
          0.2 kB
          Sunitha Kambhampati
        2. derby1466.diff.txt
          2 kB
          Sunitha Kambhampati
        There are no Sub-Tasks for this issue.

        Activity

          People

            skambha Sunitha Kambhampati
            kmarsden Katherine Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: