Skip to content

Instantly share code, notes, and snippets.

@jcrossley3
jcrossley3 / todo.org
Created January 24, 2012 16:55
Simulated clustering

To test clustering using a single JBoss instance on a single server, use the properties jboss.node.name, jboss.server.data.dir, and jboss.socket.binding.port-offset

In one shell, run

$JBOSS_HOME/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.node.name=one -Djboss.server.data.dir=/tmp/one

In another, run

$JBOSS_HOME/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.node.name=two -Djboss.server.data.dir=/tmp/two -Djboss.socket.binding.port-offset=100
require 'java'
require 'rubygems'
def require_module_jar(path)
require File.join( ENV['TORQUEBOX_HOME'], "/jboss/modules/", path )
end
require_module_jar "javax/jms/api/main/jboss-jms-api_1.1_spec-1.0.0.Final.jar"
require_module_jar "javax/transaction/api/main/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"
require_module_jar "org/hornetq/main/hornetq-core-2.2.7.Final.jar"
$ rvm install jruby
$ rvm --create jruby@torquebox
$ gem install bundler
$ gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
$ gem install rails
$ rails new myapp -m $(torquebox env TORQUEBOX_HOME)/share/rails/template.rb
$ cd myapp
$ torquebox deploy
$ torquebox run
require 'torquespec'
TorqueSpec.local {
require 'capybara/dsl'
require 'akephalos'
Capybara.register_driver :akephalos do |app|
Capybara::Driver::Akephalos.new(app, :browser => :firefox_3)
end
require "#{File.dirname(__FILE__)}/../../twitter/spec/spec_helper"
require 'torquebox-core'
remote_describe "tweet consumption testing" do
# Necessary for injection in examples
include TorqueBox::Injectors
# Deploy our apps
deploy <<-END.gsub(/^ {4}/,'')
require 'spec_helper'
require 'open-uri'
# A remote group nested within a local one
describe "end-to-end testing" do
# Deploy our apps
deploy <<-END.gsub(/^ {4}/,'')
application:
root: #{File.dirname(__FILE__)}/..
Dear Mr. Benton,
It has been brought to our attention that our social studies
class, Ze Fat Cats, has been treated differently than the other
classes in the case of the ropes course. This message is written
not in an act of asking to go out, but why we don't and if we
will. Therefore, we hope you take us seriously and consider our
thoughts.
We happen to know that both the Lactopuses (Lactopi?) and the
Spec::Runner.configure do |config|
config.before(:suite) do
configuration = org.jboss.arquillian.impl.XmlConfigurationBuilder.new.build()
Thread.current[:test_runner_adaptor] = org.jboss.arquillian.impl.DeployableTestBuilder.build(configuration)
Thread.current[:test_runner_adaptor].beforeSuite
end
config.before(:all) do
if (self.class.respond_to? :create_deployment)