activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Reese <>
Subject RE: Service Wrapper on Windows Server 2008 R2
Date Fri, 08 Oct 2010 16:25:23 GMT
The work-around is using the Daemon interface.

Basically console.Main calls shellcommand to get it started, then exits.
If you use the Daemon interface, and then code it to create and call the start/stop console
command this goes away.

Basically, for start/stop you have to call the Startup/ShutdownCommand to start/stop from
the implementation of the daemon interface.

I have the correct code, but like I said, I am waiting for approval to give it back.  ;)

So onto the jsvc problem.  If you implement the interface it expects to sit there and run,
and then call the implemented stop method to stop it.

IIRC, If you just let it call main, it expects stop to run some java, and return control to
the JVM, so --noSystemExit is a hack around just starting and stopping correctly.

Here, we don't enable JMX, so it was a requirement that ActiveMQ be able to start/stop without
requiring JMX to do it.


-----Original Message-----
From: Pitre, Russell [] 
Sent: Friday, October 08, 2010 9:12 AM
Subject: RE: Service Wrapper on Windows Server 2008 R2

Excellent.  Thanks.

The only problem I'm still running into is when I stop the service I get a "Error 109: The
pipe has been ended".  After looking at this ( ) and this (
in/java/org/apache/activemq/console/ the errors makes more sense.  I'm not sure
if there's a workaround other than modifying to not call System.exit(0);  The only
option I see is to test for an additional argument like (--noSystemExit). 


-----Original Message-----
From: Allen Reese []
Sent: Friday, October 08, 2010 11:52 AM
Subject: RE: Service Wrapper on Windows Server 2008 R2

I thought I had created a JIRA for this, but I have a similar issue.  :)

At Yahoo!, we use jsvc to start/stop things, and as such I've implements the Commons Daemon
interface for starting and stopping ActiveMQ.  I am waiting for approval to contribute the
wrapper code, and start/stop scripts for RHEL, and this should tie in nicely with the windows
work you have done.

I created a JIRA for this:, as I am just waiting approval for the
Java code Yahoo! Has created, and it looks like you have the windows side done, all that is
left is the shell scripts for start/stop on Linux.


-----Original Message-----
From: Pitre, Russell []
Sent: Friday, October 08, 2010 6:05 AM
Subject: Service Wrapper on Windows Server 2008 R2

I recently wrote a blog article about using Commons Daemon Procrun as a service wrapper for
ActiveMQ running on Windows server 2008 R2 64-bit.
Passing the link along for anyone who may find it useful.  I searched for alternative 64-bit
compatible service wrappers on windows systems and didn't come up with any solutions that
I found would make it easy to manage and configure the windows service, so I gave Procrun
a shot, I figured if Tomcat ships with it, why not try it out with ActiveMQ.


Let me know if you see any errors or gotchas.





View raw message