7 Replies Latest reply on Jun 29, 2002 5:24 AM by venkat

    shut down jboss as an NT service

    fredericagneray

      Hello,

      Does anybody succeed having jboss as a proper service into NT ? (with JNT or alexandria or anything...)

      I've installed jboss as an NT service using JNT. As suggested by JNT I got a method called systemExit() into org.jboss.main and i call it in JNT with Dshutdown.method=systemExit.
      However when i try to stop the service, it doesn't call this method and just shut down the JVM.

      does anybody run into the same problem ?

      here's my command line to install jboss as a service...

      JNT "/InstallAsService:Firmament" "/SD%JBOSS_HOME%/bin" -Dshutdown.method=systemExit -Xms64M -Xmx256M -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl -classpath "%JBOSS_HOME%/bin/run.jar;%JBOSS_HOME%/lib/crimson.jar;%JAVA_HOME%/lib/tools.jar" org.jboss.Main lrs

        • 1. Re: shut down jboss as an NT service
          boru

          I think in 3.0 the method is: org.jboss.Shutdown, and it is found in its own JAR file called Shutdown.jar in the /bin directory.

          • 2. Re: shut down jboss as an NT service

            Use Alexandria. I am using it with great success in both 2.4.6 and 3.0.0. I think JNT might be a dead project.

            Jim

            • 3. Re: shut down jboss as an NT service
              venkat

              hello there!
              thankx for giving reply.i have downloaded alexandria tool
              service was created but internal windows erroris coming.i used the following command line
              JavaService.exe -install "My Service" D:\jdk1.3\jre\bin\classic -Djava.class.path=d:\JBoss-2.2.2_Tomcat3.2.2\jboss\bin\run.jar;d:\JBoss-2.2.2_Tomcat3.2.2\jboss\lib\crimson.jar -start org.jboss.Main -params tomcat -err d:\cdcopy\stderr.txt

              The error was"could not start myservice.service didnt return any error.contact system administration"

              i would be glad if u send me the coded registry setting.
              u said it working fine on ur system i am unable to run Jboss as a servie please help me out i need to do it at any cost.do me a favour by mailing all the details to rchowdary@citl-org.com

              • 4. Re: shut down jboss as an NT service
                fredericagneray

                In the alexandria documentation they use the jvm.dll located in jre/bin/classic dir, my problem was that the server was not running correctly even if the shutdown was nice.

                However if I changed to jre/bin/hotspot/jvm.dll then the server was running fine and the shutdown is nice and gracefull.

                JNT shutdown method doesn't work as far as I can see.

                I finally used alexandria and it is perfect ( after trying 5 differents services).

                • 5. Re: shut down jboss as an NT service

                  Change your JavaService command line as to the following

                  JavaService.exe
                  -install
                  "My Service"
                  D:\jdk1.3\jre\bin\hotspot\jvm.dll
                  -Djava.class.path=d:\JBoss-2.2.2_Tomcat3.2.2\jboss\bin\run.jar;d:\JBoss-2.2.2_Tomcat3.2.2\jboss\lib\crimson.jar
                  -start org.jboss.Main
                  -method main
                  -params tomcat
                  -stop org.jboss.Main
                  -method systemExit
                  -err d:\cdcopy\stderr.txt
                  -current d:\JBoss-2.2.2_Tomcat3.2.2


                  HTH

                  Jim

                  • 6. Re: shut down jboss as an NT service
                    venkat

                    Thanks for sending the modified command line.but it was throwing the same internal window error wheni try to run the service.systemExit exists in org.jboss.main or we have to write the method.can u check in ur system the same command line.i am unable to run jboss as a service sill

                    • 7. Re: shut down jboss as an NT service
                      venkat

                      JavaService.exe -install "MyJbossService" D:\jdk1.3\jre\bin\hotspot\jvm.dll -Djava.class.path=d:\JBoss-2.2.2_Tomcat3.2.2\jboss\bin\run.jar;d:\JBoss-2.2.2_Tomcat3.2.2\jboss\lib\crimson.jar -start org.jboss.Main -method main -params tomcat -stop org.jboss.Main -method systemExit -err d:\cdcopy\stderr.txt -current d:\JBoss-2.2.2_Tomcat3.2.2

                      I have the run the following command on dos prompt service is created but i am unable to run the service
                      as it throws some internal window error.i am unable to start the service.u said its working fine on ur system.
                      can u please guide me the whole procedure and canu send me the run.jar as an attachment with shutdown method.
                      do help me i have to do it is it possible for u to send the entire procedure to rchowdary@citl-org.com
                      Regards,
                      Venkat