This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JRubyDaemon implements Daemon { | |
private Ruby runtime; | |
private Thread thread; | |
private RubyModule appModule; | |
private boolean debug; | |
private RubyModule daemon; | |
public void init(DaemonContext arguments) throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Generic script for running ruby scripts as daemons using | |
# jsvc and a java class to control the daemon. | |
# | |
# Contains common parameters and start/stop | |
# Things you'll need to set on a per script/daemon basis: | |
# SCRIPT_NAME | |
# | |
# Things you can set: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def MyClass | |
module Transactional | |
def delete_them | |
db.delete | |
end | |
end | |
# this looks for a transaction module, introspects the methods, | |
# adds new methods to MyClass which create transactions and then calls |
NewerOlder