10 Replies Latest reply on Jan 24, 2013 6:39 AM by vpolakis

    \bin\run.jar

    vpolakis

      Hi,

       

      i am currently migrating Jboss 4.2.2 to 7.1.1

      In order to start as a service we use JavaService.exe (windows server 2007)

       

      but JBOSS_HOME%\bin\run.jar is used which is not avaliable in jboss 7

       

      e.g

      set CLASSPATH=%NAGENT_JBOSS_HOME%\bin\run.jar

      JavaService.exe  -install %SERVICE_NAME% %NAGENT_JAVA_HOME%\bin\server\jvm.dll -Djava.class.path=%CLASSPATH%...

       

      Can you please help me identify what to use instead of run.jar

       

      Also another question is that we use

      set CLASSPATH=%CLASSPATH%;%CFBB_JAR_LIB%\aspectjrt.jar;%CFBB_JAR_LIB%\CommonAdapter.jar;%JBOSS_HOME%\lib\TracingFramework.jar;%NETMADAPTER_LIB%\SCJavaInterface.jar;%NETMADAPTER_LIB%\SCRmiServer.jar;%ORG_CLASSPATH%

       

      where %JBOSS_HOME%\lib\TracingFramework.jar points to the \lib directory which also doen't exist in Jboss 7

      We used global module approach so now they are located in \modules\itil\foo\main folder

       

      is there any trouble with this?

       

      thank you in advance

        • 1. Re: \bin\run.jar
          nickarls

          Don't know about JavaService but using the native connectors for JBossWeb is pretty straightforward: https://community.jboss.org/wiki/RunningJBossAS7AsAWindowsService

          1 of 1 people found this helpful
          • 2. Re: \bin\run.jar
            vpolakis

            Hi Nicklas,

             

            thx for the help

             

            My problem is the arguments, we use most of them already e.g method, etc

             

            http://javaservice.ow2.org/docs/devdocs/devcmds.html

             

            is there any documentation about jbosssvc.exe?

            i could only found:

            jbosssvc -- program for running batch files as services.

            Usage: jbosssvc -i        service service.bat
                            -i[wdcl]  service workingpath description comment
                                      service.bat
                            -u        service
                            -t        service
            Options:
               -d   Service display name
               -c   Service description
               -w   Service working path
               -l   Turn info logging On

             

            many again in advance

            • 3. Re: \bin\run.jar
              nickarls

              Well, what are your requirements (e.g. what do you need the -method for)?

              • 4. Re: \bin\run.jar
                vpolakis

                Thx again really appreciated,

                Start method  is main, which I guess it’s not so important…same for start class but I have no idea for jvm_library, jvm_option and LOG

                 

                 

                _________________________

                set PROCESSTYPE=JBOSS

                TITLE %PROCESSTYPE%

                 

                set LOG_VM_ARGS=-Dprocess.name=%PROCESSTYPE% -Djava.util.logging.config.file=%NADAPTER_LIB%\logging.%PROCESSTYPE%.properties

                 

                set CLASSPATH=%JBOSS_HOME%\bin\run.jar;%JAVA_HOME%\lib\tools.jar;%N_NBITF_LIB%\bcb.jar;%N_NBITF_LIB%\log4j.jar;%N_NBITF_LIB%\bicnet-util.jar;%N_NBITF_LIB%\LicensingAPI.jar;%N_NBITF_LIB%\cglib.jar;%N_NBITF_LIB%

                 

                set VM_ARGS=-Xms128m -Xmx512m -Xbootclasspath/a:%JBOSS_HOME%\lib\JBossTracingPlugin.jar;%JBOSS_HOME%\lib\TracingFramework.jar;%JBOSS_HOME%\lib\aspectjrt.jar

                 

                set VM_ARGS=%VM_ARGS% -Dorg.jboss.logging.Logger.pluginClass=com.tracing.optional.JBossLoggerPlugin -Djava.util.logging.config.file=%NADAPTER_LIB%\logging.JBOSS.properties

                 

                set VM_ARGS=%VM_ARGS% -DCorbaNitf.Dir=%NADAPTER_LIB% -DSNMPNAgent.Dir=%NADAPTER_LIB% -DPropertyFile=%NADAPTER_LIB%\MibHandling.properties

                 

                set START_CLASS=org.jboss.Main

                set START_METHOD=main

                set START_ARGS=-c default -L JBossTracingPlugin.jar -b 0.0.0.0

                set SERVICE_NAME=NADAPTER_JBOSS_SERVICE

                rem set STDOUT=%NADAPTER_LIB%\%SERVICE_NAME%_STDOUT.log

                rem STDERR=%NADAPTER_LIB%\%SERVICE_NAME%_STDERR.log

                set STDOUT=nul

                set STDERR=nul

                 

                set FAU_NAME=%2

                set FAU_PASSWord=%3

                 

                1. JavaService.exe

                -install %SERVICE_NAME%

                %JAVA_HOME%\bin\server\jvm.dll

                -Djava.class.path=%CLASSPATH%

                %VM_ARGS%

                %LOG_VM_ARGS%

                                -start %START_CLASS%

                -method %START_METHOD%

                -params %START_ARGS%

                                -out %STDOUT%

                                -err %STDERR%

                -manual

                                -user %FAU_NAME%

                • 5. Re: \bin\run.jar
                  nickarls

                  JavaService is a general wrapper. With the JBossWeb Native Connectors you don't need to know all those parameters since it just calls service.bat which calls standalone.bat so there is very little configuration to be done.

                  • 6. Re: \bin\run.jar
                    vpolakis

                    thanks, but how do i set the VM arguments and password parameters?

                    • 7. Re: \bin\run.jar
                      nickarls

                      in the standalone.conf.bat/standalone.bat like for normal startup. User/password is set through normal windows service settings.

                      • 8. Re: \bin\run.jar
                        vpolakis

                        thanks, i mapped most of my arguments/options to jbosssvc (in standalone.conf.bat), one question:

                        Do you know what to do with  -Djava.class.path=%CLASSPATH%...?

                        • 9. Re: \bin\run.jar
                          nickarls

                          You don't really need it. You start off the the modules.jar on the classpath and it goes from there.

                          • 10. Re: \bin\run.jar
                            vpolakis

                            thanks again the the help

                            but also other paths are used outside JBOSS_HOME e.g NBITF_LIB which another drive in the same machine

                             

                            set CLASSPATH=%JBOSS_HOME%\bin\run.jar;%JAVA_HOME%\lib\tools.jar;%NBITF_LIB%\bcb.jar;%NBITF_LIB%\log4j.jar;%NBITF_LIB%\bicnet-util.jar;%NBITF_LIB%\LicensingAPI.jar;%NBITF_LIB%\cglib.jar;%NBITF_LIB%