Pages

Monday, March 13, 2006

JBoss as windows service

To run Jboss as windows service visit following site:

http://wiki.jboss.org/wiki/Wiki.jsp?page=RunJBossAsAServiceOnWindows

But it seems to me that this site information is not complete.

This site suggests that one should use JavaService.exe as following:
JBossService.exe -install JBoss
{JDK_HOME}\jre\bin\{hotspot|server|classic}\jvm.dll
-Djava.class.path={JDK_HOME}\lib\tools.jar;{JBOSS_BIN}\run.jar
-start org.jboss.Main
-stop org.jboss.Main -method systemExit
-out {JBOSS_BIN}\stdout.log
-err {JBOSS_BIN}\stderr.log
-current {JBOSS_BIN}
-depends mysql
-manual


But the parameter required by JVM, at least in my case should be more:

{JDK_HOME}\jre\bin\{hotspot|server|classic}\jvm.dll
-Xmx1300m -Xms1300m
-verbose:gc [might be optional]
-Xloggc:gc [might be optional]
-Djava.endorsed.dirs={JBOSS_BIN}\server\default\lib\endorsed
-Djava.class.path={JDK_HOME}\lib\tools.jar;{JBOSS_BIN}\bin\run.jar

Parameters after -err can be avoided.

No comments: