-
1. Re: \bin\run.jar
nickarls Jan 22, 2013 12:05 PM (in response to vpolakis)1 of 1 people found this helpfulDon't know about JavaService but using the native connectors for JBossWeb is pretty straightforward: https://community.jboss.org/wiki/RunningJBossAS7AsAWindowsService
-
2. Re: \bin\run.jar
vpolakis Jan 22, 2013 2:57 PM (in response to nickarls)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 Onmany again in advance
-
3. Re: \bin\run.jar
nickarls Jan 22, 2013 3:18 PM (in response to vpolakis)Well, what are your requirements (e.g. what do you need the -method for)?
-
4. Re: \bin\run.jar
vpolakis Jan 22, 2013 5:18 PM (in response to nickarls)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
- 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 Jan 23, 2013 1:12 AM (in response to vpolakis)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 Jan 23, 2013 3:42 AM (in response to nickarls)thanks, but how do i set the VM arguments and password parameters?
-
7. Re: \bin\run.jar
nickarls Jan 23, 2013 3:44 AM (in response to vpolakis)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 Jan 23, 2013 12:15 PM (in response to nickarls)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 Jan 23, 2013 12:54 PM (in response to vpolakis)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 Jan 24, 2013 6:39 AM (in response to nickarls)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%