5 Replies Latest reply on Apr 11, 2008 11:07 AM by peterj

    Running JBoss as a service - profile selection

    petraska

      Hello, I am using the JBoss native tool to install a service to start and stop Jboss. However, it attempts to run the default profile, whereas I want it to run the all profile. How do I change this? Cheers.

        • 1. Re: Running JBoss as a service - profile selection
          ritu2p

          I have used the JavaServiceWrapper and it works great. In the wrapper.conf file, just add parameters in the Application parameters section:

          wrapper.app.parameters.1=org.Jboss.Main
          wrapper.app.parameters.2=-c
          wrapper.app.parameters.3=<Jboss server name>

          • 2. Re: Running JBoss as a service - profile selection
            peterj

            In JBoss Native, what I recommend is the following:

            1) Make a copy of service.bat as service_XXX.bat (where XXX is the server configuration name)

            2) Modify service_XXX.bat, changing the lines to install the service (have it reference the service_XXX.bat file, end of the second line):

            :cmdInstall
            jbosssvc.exe -iwdc %SVCNAME% "%DIRNAME%" "%SVCDISP%" "%SVCDESC%" service_XXX.bat
            @if not errorlevel 0 goto errExplain
            echo Service %SVCDISP% installed
            goto cmdEnd


            and change the start service command to include the XXX configuration:

            :cmdStart
            REM Executed on service start
            call run.bat -c XXX >run.log
            goto cmdEnd



            • 3. Re: Running JBoss as a service - profile selection
              petraska

              Thank you for the responses, I used PeterJ's method and it worked well. Cheers.

              • 4. Re: Running JBoss as a service - profile selection
                marcda

                hello,
                i customized the "service.bat" in a way, PerterJ described.
                when starting the service via " net start ", i got the following message:
                JBOSS_KIWO PD1 Application Server 4.2 is starting.
                JBOSS_KIWO PD1 Application Server 4.2could not be started.
                The service did not report an error.
                More help is available by typing NET HELPMSG 3534.

                Any suggestions?

                thank you,
                marc

                ps:
                "JBoss 4.2.1.GA" under "Windows 2003 SP2"

                • 5. Re: Running JBoss as a service - profile selection
                  peterj

                  If you followed my instructions, there should be a run.log file in the bin directory. What does it contain?

                  Also, have you tried to manually run service.bat? If so, what does it do?

                  Finally, what account are you using for the service? Log onto that account and run service.bat manually. What happens?