Skip to content

Instantly share code, notes, and snippets.

@tobias
Created January 11, 2012 19:50
Show Gist options
  • Save tobias/1596428 to your computer and use it in GitHub Desktop.
Save tobias/1596428 to your computer and use it in GitHub Desktop.
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"
require_module_jar "org/hornetq/main/hornetq-jms-2.2.7.Final.jar"
require_module_jar "org/jboss/netty/main/netty-3.2.5.Final.jar"
require 'torquebox-messaging'
q = TorqueBox::Messaging::Queue.new( "/queue/foo" )
q.publish( "hi!" )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment