Re: [Resin-interest] Launching Resin from Mac OS X launchd

2010-07-20 Thread Rick Mann
Thanks, Scott. You'd think that an explicit command to stop would mean stop, 
not stop and restart.

I want to use submit because I'm actually doing this from a menu bar status 
item, and would rather avoid creating the file (so inelegant). Is that not 
possible? I exec it from the program.

-- 
Rick

On Jul 20, 2010, at 10:05:10, Scott Ferguson wrote:

 Rick Mann wrote:
 On Jul 14, 2010, at 17:11:09, Scott Ferguson wrote:
 
 
 Rick Mann wrote:
 
 I know we've discussed this a bit in the past, but it seems that Resin is 
 ever-evolving on the subject.
 
 
 
 I've added this as http://bugs.caucho.com/view.php?id=4124.
 
 We don't have quite the right behavior for launchd, but it shouldn't be 
 hard to change.
 
 
 Great, thanks, Scott! I've written a little Menu Bar Status Item that allows 
 you to start and stop Resin, but it does so via launchd, and I haven't 
 worked out all the kinks yet. When I do, I'd be happy to give it to you guys.
 
 When I checked this, it looks like the console is behaving correctly 
 for launchd, and the restart you're seeing is launchd's own behavior. 
 The default behavior for launchd is to restart the application on stop :).
 
 To get the behavior you want, you'll need to create a resin.plist that 
 looks something like the following, and then use launchctl load 
 instead of submit:
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN 
 http://www.apple.com/DTDs/PropertyList-1.0.dtd;
 plist version=1.0
 dict
keyLabel/key
stringcom.caucho.resin/string
keyProgramArguments/key
array
 string/usr/bin/java/string
string-jar/string
string/Users/scottferguson/resin-4.0.8/lib/resin.jar/string
stringconsole/string
/array
keyStandardErrorPath/key
string/Users/scottferguson/resin-4.0.8/log/test.err/string
keyStandardOutPath/key
string/Users/scottferguson/resin-4.0.8/log/test.log/string
 /dict
 /plist
 
 The key difference from the standard .plist is that I've deleted the 
 OnDemand and Keepalive items.
 
 -- Scott
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Launching Resin from Mac OS X launchd

2010-07-20 Thread Scott Ferguson
Rick Mann wrote:
 Thanks, Scott. You'd think that an explicit command to stop would mean 
 stop, not stop and restart.

 I want to use submit because I'm actually doing this from a menu bar status 
 item, and would rather avoid creating the file (so inelegant). Is that not 
 possible? I exec it from the program.
   
I only looked at the launchctl stuff for an hour or so, and I didn't 
find it. It seems surprising that the submit didn't have an option for 
the keepalive capabilities, so it's entirely possible that the option 
exists, but I just didn't find it.

-- Scott



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Launching Resin from Mac OS X launchd

2010-07-20 Thread Rick Mann

On Jul 20, 2010, at 12:26:55, Scott Ferguson wrote:

 Rick Mann wrote:
 Thanks, Scott. You'd think that an explicit command to stop would mean 
 stop, not stop and restart.
 
 I want to use submit because I'm actually doing this from a menu bar status 
 item, and would rather avoid creating the file (so inelegant). Is that not 
 possible? I exec it from the program.
 
 I only looked at the launchctl stuff for an hour or so, and I didn't 
 find it. It seems surprising that the submit didn't have an option for 
 the keepalive capabilities, so it's entirely possible that the option 

I'll let you know what I find.

Thanks!

-- 
Rick




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Launching Resin from Mac OS X launchd

2010-07-14 Thread Scott Ferguson
Rick Mann wrote:
 I know we've discussed this a bit in the past, but it seems that Resin is 
 ever-evolving on the subject.

   
I've added this as http://bugs.caucho.com/view.php?id=4124.

We don't have quite the right behavior for launchd, but it shouldn't be 
hard to change.

-- Scott
 Is there guidance on the right way to set up Resin as a Mac OS X 
 LaunchDaemon? I'm currently launching it like this:

 $ /bin/launchctl submit -l com.caucho.resin -p 
 /System/Library/Frameworks/JavaVM.framework/Home/bin/java -o 
 /Users/rmann/Desktop/stdout.log -e /Users/rmann/Desktop/stderr.log -- 
 /System/Library/Frameworks/JavaVM.framework/Home/bin/java -server -d64 
 -Djava.awt.headless=true -ea -esa -Dfile.encoding=utf-8 -jar 
 /Library/Resin/Current/lib/resin.jar -verbose -root-directory 
 /Library/Resin/Root -conf /Library/Resin/Resin.xml console


 But when I try to stop it with

 $ launchctl stop com.caucho.resin

 It stops and restarts. I'm not sure if that's launchd restarting it, or if 
 resin's watchdog is somehow getting involved. But I (think I) just want to 
 run resin without the watchdog (which means a lot of config has to be 
 supplied on the command line/Launchd plist).

 Any suggestions? Thanks!

   



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Launching Resin from Mac OS X launchd

2010-07-14 Thread Rick Mann

On Jul 14, 2010, at 17:11:09, Scott Ferguson wrote:

 Rick Mann wrote:
 I know we've discussed this a bit in the past, but it seems that Resin is 
 ever-evolving on the subject.
 
 
 I've added this as http://bugs.caucho.com/view.php?id=4124.
 
 We don't have quite the right behavior for launchd, but it shouldn't be 
 hard to change.

Great, thanks, Scott! I've written a little Menu Bar Status Item that allows 
you to start and stop Resin, but it does so via launchd, and I haven't worked 
out all the kinks yet. When I do, I'd be happy to give it to you guys.

-- 
Rick


 
 -- Scott
 Is there guidance on the right way to set up Resin as a Mac OS X 
 LaunchDaemon? I'm currently launching it like this:
 
 $ /bin/launchctl submit -l com.caucho.resin -p 
 /System/Library/Frameworks/JavaVM.framework/Home/bin/java -o 
 /Users/rmann/Desktop/stdout.log -e /Users/rmann/Desktop/stderr.log -- 
 /System/Library/Frameworks/JavaVM.framework/Home/bin/java -server -d64 
 -Djava.awt.headless=true -ea -esa -Dfile.encoding=utf-8 -jar 
 /Library/Resin/Current/lib/resin.jar -verbose -root-directory 
 /Library/Resin/Root -conf /Library/Resin/Resin.xml console
 
 
 But when I try to stop it with
 
 $ launchctl stop com.caucho.resin
 
 It stops and restarts. I'm not sure if that's launchd restarting it, or if 
 resin's watchdog is somehow getting involved. But I (think I) just want to 
 run resin without the watchdog (which means a lot of config has to be 
 supplied on the command line/Launchd plist).
 
 Any suggestions? Thanks!
 
 
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest