I've been trying to get this to run for ages now and run into a lot of problems.
Attempt 1: Someone here has a VB.Net service runner that installs a service and stops it.
I wrote a few scripts and it worked... BUT:
The jmx console isn't accessible locally. It's there but jconsole or another program can't access it since they can't find how the program's main entry point is so all I see is the pid greyed out. same in the new jvisualvm.
Attempt 2: Use tomcats service installer with jdk x64. After some considerable experimentaions I created this script (WIP, see bellow):
BUT: java x64 has issues and I couldn't get the right dlls to load
Attempt 3: Use tomcat service installer with jdk x86.
rem Start HornetQ using the profile1
for /R %HORNET_HOME%\lib %%A in (*.jar) do (
%APP_HOME%\tomcat6-x86.exe //IS//HornetProfile1 --Install=%APP_HOME%\tomcat6-x86.exe --Description="HornetQ Profile1 tc" --Jvm=auto --Classpath=%CLASSPATH% --JvmMs512M --JvmMx1024M --JvmOptions="%JVM_ARGS%" --StartMode=jvm --StartClass=org.hornetq.integration.bootstrap.HornetQBootstrapServer --StartParams=hornetq-beans.xml --LogPath=%APP_HOME% --StdOutput=auto --StdError=auto
BUT: I when I startup the service I get this:
... javajni.c] [error] Static method 'void main(String)' in Class org/hornetq/integration/bootstrap/HornetQBootstrapServer not found
[2010-09-13 16:28:52] [996 prunsrv.c] [error] Failed loading main org/hornetq/integration/bootstrap/HornetQBootstrapServer class ...
... prunsrv.c] [error] Failed loading main org/hornetq/integration/bootstrap/HornetQBootstrapServer ...
I have 2 question:
1. What is the entry point I should use in this script for Hornet (tomcat looks for main)?
2. Is there a better way to install multiple instances (or even 1 instance) of stand-alone non-clustered HornetQ as a windows service?