This file contains 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
AnnotationConfiguration cfg = new AnnotationConfiguration(); | |
cfg.configure(); | |
cfg.addAnnotatedClass(Produto.class); | |
cfg.addAnnotatedClass(Categoria.class); | |
// ... | |
SessionFactory factory = cfg.buildSessionFactory(); | |
Session session = factory.openSession(); | |
// ... |
This file contains 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
$ jruby -J-Xss256k -d -e "require 'java'; require 'servlet-api-2.5.jar'; module A; include Java::JavaxServletHttp::HttpServletResponse; end" | |
/Users/fck/Development/Ruby/jruby-1.1.4/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/module.rb:16 warning: instance variable @java_aliases not initialized | |
/Users/fck/Development/Ruby/jruby-1.1.4/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/module.rb:16 warning: instance variable @java_aliases not initialized | |
/Users/fck/Development/Ruby/jruby-1.1.4/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/module.rb:16 warning: instance variable @java_aliases not initialized | |
/Users/fck/Development/Ruby/jruby-1.1.4/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/module.rb:16 warning: instance variable @java_aliases not initialized | |
Error: Your application used more stack memory than the safety cap of 256k. | |
Specify -J-Xss####k to increase it (#### = cap size in KB). | |
Exception trace follows: | |
java.lang.StackOverflowError | |
at java.util.concurrent.locks.Reent |
This file contains 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
@Entity | |
public class Carro { | |
// ... | |
} |
This file contains 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 Bicicleta { | |
@Transient | |
private double velocity; | |
} |
This file contains 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 Sistema { | |
@EnviaEmail(Emails.CONFIRMACAO) | |
public void cadastra(Usuario usuario) { | |
//... | |
} | |
} |
This file contains 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 Sistema { | |
public void cadastra(Usuario usuario) { | |
mensageiro.enviaEmail(Emails.CONFIRMACAO, usuario); | |
// ... | |
} | |
} |
This file contains 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
<path id="lib.classpath"> | |
<pathelement location="${build.lib.dir}/retroweaver-2.0.5.jar"/> | |
<pathelement location="${build.lib.dir}/retroweaver-rt-2.0.5.jar"/> | |
<pathelement location="${build.lib.dir}/backport-util-concurrent.jar"/> | |
<pathelement location="/usr/java/j2sdk1.4.2_16/jre/lib/rt.jar" /> | |
<pathelement location="${lib.dir}/bsf.jar" /> | |
</path> | |
This file contains 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
// WebAppDeployer for jetty, which supports different war folders for different virtual hosts | |
package br.com.caelum.jetty; | |
import java.util.ArrayList; | |
import org.mortbay.component.AbstractLifeCycle; | |
import org.mortbay.jetty.Handler; | |
import org.mortbay.jetty.HandlerContainer; | |
import org.mortbay.jetty.deployer.WebAppDeployer; |
This file contains 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 method_missing(name, *args) | |
puts "<#{name}>#{args[0]}" | |
yield if block_given? | |
puts "</#{name}>" | |
end | |
html do | |
body do | |
h1 "My internal DSL" | |
div do |
This file contains 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
require 'cucumber/rake/task' | |
namespace :cucumber do | |
Cucumber::Rake::Task.new(:plain) do |t| | |
t.cucumber_opts = "--format pretty" | |
t.step_list = %w{features/support/env.rb features/support/plain.rb features/step_definitions} | |
t.feature_list = %w{features/plain} | |
end | |
task :plain => 'db:test:prepare' | |
OlderNewer