Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4508161

REGRESSION:Application started as Service under WinNT/2000 dies if user logs off

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3.1_01
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description



      Name: rmT116609 Date: 09/27/2001


      java version "1.3.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
      Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

      Java Application started as Service under Win NT/2000 dies if user logs off
      see bug#4323062

      This is a regression bug. The application worked fine in JDK1.3.1-b24
      if we pass -Xrs flag as a command line option to the JVM. But it had
      broken in JDK1.3.1_01.


      Using ServiceInstaller 1.1 (http://www.kcmultimedia.com/smaster) install a
      simple Java app as a service that outputs some trivial data to a file every
      10 seconds.

      Here's the simple demo service :

      import java.io.*;
      import java.util.*;


      public class Test2
      {
          public static void main(String[] args)
          {

              Date now;
              PrintWriter out;

              try{

                  

                  while(true){

                      now = new Date();
                      out = new PrintWriter(new FileWriter("test2.out",true), true);
                      out.println(now.toString());
                      out.close();

                      Thread.sleep(10000);

                  }

              }catch(Exception e){

                  System.out.println(e.toString());

              }
          }
      }

      With JDK1.3.1:
      -------------------------

      Start the service from the Control Panel|Services Applet, and check the
      contents of the file test2.out, which should append a line showing the
      date and time each 10 sec.

      Log off, and log back in.

      Although NT thinks the service is still running, it is not. You will see
      that lines are no longer appended to the file.

      If you pass -Xrs command-line option to the JVM, then the application works fine(Bug ID: 4323062).


      With JDK1.3.1_01:
      ------------------------
      Please pass -Xrs flag as an command line option to the JVM.

      Start the service from the Control Panel|Services Applet, and check the
      contents of the file test2.out, which should append a line showing the
      date and time each 10 sec.

      Log off, and log back in.

      Although NT thinks the service is still running, it is not. You will see
      that lines are no longer appended to the file.

      If you do not pass -Xrs flag as a command line option to the JVM, then
      the application works fine.



      (Review ID: 132178)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                asultano Alex Sultanov
                Reporter:
                rmandalasunw Ranjith Mandala (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: