Skip to content

Instantly share code, notes, and snippets.

View abstractj's full-sized avatar

Bruno Oliveira da Silva abstractj

View GitHub Profile
@abstractj
abstractj / custom_quartz
Created November 10, 2011 16:08
custom_quartz
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/Bruno/rubyconfbr/torquebox-2.x.incremental.584/jboss
JAVA: /Library/Java/Home/bin/java
JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
@abstractj
abstractj / SimpleJob
Created October 28, 2011 19:00
SimpleJob
package com.abstractj.jobs;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Date;
/**
* User: Bruno
@abstractj
abstractj / SimpleJob
Created October 28, 2011 18:57
WatchDogSchedulerFactory
package com.abstractj.jobs;
import org.quartz.*;
import org.quartz.core.JobRunShell;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@abstractj
abstractj / Main
Created October 27, 2011 13:47
Main
/**
* Copyright 2011 Douglas Campos
* Copyright 2011 dynjs contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@abstractj
abstractj / BeerJob
Created October 24, 2011 14:52
BeerJob
class BeerJob
def initialize
puts "Initializing scheduler #{Time.now}"
end
def run
begin
sleep(40000);
puts "Job was finished"
@abstractj
abstractj / syntax_dep
Created October 19, 2011 16:07
syntax_dep
[INFO] Installing maruku gem v0.6.0
[WARNING] ERROR: Error installing maruku:
[WARNING] maruku requires syntax (>= 1.0.0, )
[WARNING] LoadError: no such file to load -- maruku
[WARNING] require at org/jruby/RubyKernel.java:1038
[WARNING] require at file:/Users/Bruno/.m2/repository/org/jruby/jruby-complete/1.6.4/jruby-complete-1.6.4.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29
[WARNING] force_require at /Users/Bruno/opensource/torquebox/gems/bin/run-yard.rb:19
[WARNING] (root) at /Users/Bruno/opensource/torquebox/gems/bin/run-yard.rb:24
[WARNING] load at org/jruby/RubyKernel.java:1063
[WARNING] (root) at -e:1
@abstractj
abstractj / assembly_tool.rb
Created October 18, 2011 01:15
assembly_tool.rb
[WARNING] NoMethodError: undefined method `add_element' for nil:NilClass
[WARNING] enable_messaging_jmx at /Users/Bruno/opensource/torquebox/build/assembly/lib/assembly_tool.rb:285
[WARNING] transform_config at /Users/Bruno/opensource/torquebox/build/assembly/lib/assembly_tool.rb:428
[WARNING] chdir at org/jruby/RubyDir.java:335
[WARNING] transform_config at /Users/Bruno/opensource/torquebox/build/assembly/lib/assembly_tool.rb:419
[WARNING] transform_configs at /Users/Bruno/opensource/torquebox/build/assembly/bin/assemble.rb:163
[WARNING] assemble at /Users/Bruno/opensource/torquebox/build/assembly/bin/assemble.rb:186
[WARNING] (root) at /Users/Bruno/opensource/torquebox/build/assembly/bin/assemble.rb:194
[WARNING] load at org/jruby/RubyKernel.java:1063
[WARNING] (root) at -e:1
@abstractj
abstractj / RubyJobProxy
Created October 14, 2011 12:53
RubyJobProxy
/*
* Copyright 2008-2011 Red Hat, Inc, and individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@abstractj
abstractj / ScheduledJob
Created October 11, 2011 13:01
ScheduledJob
/*
* Copyright 2008-2011 Red Hat, Inc, and individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@abstractj
abstractj / WatchDogJob
Created October 11, 2011 02:18
WatchDogSchedulerFactory
package com.abstractj.jobs;
import org.quartz.*;
/**
* User: Bruno
* Date: 10/10/11
* Time: 10:17 PM
*/
public class WatchDogJob implements Job {