activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Reese <are...@yahoo-inc.com>
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.

--Allen


-----Original Message-----
From: Pitre, Russell [mailto:RPITRE@shawmut.com] 
Sent: Friday, October 08, 2010 9:12 AM
To: users@activemq.apache.org
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 (
https://issues.apache.org/jira/browse/DAEMON-103 ) and this (https://svn.apache.org/repos/asf/activemq/trunk/activemq-console/src/ma
in/java/org/apache/activemq/console/Main.java) the errors makes more sense.  I'm not sure
if there's a workaround other than modifying Main.java to not call System.exit(0);  The only
option I see is to test for an additional argument like (--noSystemExit). 

-Russ

-----Original Message-----
From: Allen Reese [mailto:areese@yahoo-inc.com]
Sent: Friday, October 08, 2010 11:52 AM
To: users@activemq.apache.org
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:
https://issues.apache.org/activemq/browse/AMQ-2968, 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.

--Allen

-----Original Message-----
From: Pitre, Russell [mailto:RPITRE@shawmut.com]
Sent: Friday, October 08, 2010 6:05 AM
To: users@activemq.apache.org
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.

 

http://blog.bigrocksoftware.com/2010/10/07/commons-daemon-procrun-as-a-j
ava-service-wrapper-for-activemq/

 

 

Thanks

-Russ


Mime
View raw message