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 / infinispan_to_date_error
Created July 26, 2011 13:44
infinispan_to_date_error
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/Bruno/.rvm/gems/jruby-1.6.3@torquebox/gems/torquebox-server-2.x.incremental.265-java/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
@abstractj
abstractj / wtpbug
Created July 30, 2011 19:04
wtpbug
-Djava.endorsed.dirs="C:\jboss-6.0.0-Final\lib\endorsed"
@abstractj
abstractj / controller_demo
Created August 11, 2011 17:31
service_injection_demo
class MyController < ApplicationController
include TorqueBox::Injectors
def index
service = inject('service:MyService')
end
end
@abstractj
abstractj / cdi_error_jboss_startup
Created August 15, 2011 20:25
cdi_error_jboss_startup
➜ bazinga ~/Servers/torquebox-current/jboss/bin/run.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/Bruno/servers/torquebox-current/jboss
JAVA: /Library/Java/Home/bin/java
JAVA_OPTS: -Xms128m -Xmx1024m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh -Djava.library.path=/Users/Bruno/servers/torquebox-current/jboss/bin/native/lib64
@abstractj
abstractj / dedicatoria.h
Created August 24, 2011 19:27
dedicatoria.h
void (^now)(NSString *) = ^(NSString *from) {
NSDate *date = [NSDate date];
NSString *dedicatoria = [NSString stringWithFormat:@"Um abraço para %@", from];
NSString *assinatura = @"ferbass";
NSLog(@"%@ ,%@ \n %@", dedicatoria, assinatura, date);
};
@abstractj
abstractj / timeout
Created September 1, 2011 13:25
timeout
jobs:
my_job:
job: MyJob
timeout: 5
@abstractj
abstractj / InterruptableJob
Created October 7, 2011 17:35
InterruptableJob
/*
* 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 / SimpleJob
Created October 10, 2011 14:24
SimpleJob
package com.abstractj.jobs;
import org.quartz.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Calendar;
/**
* User: Bruno
@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 {
@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