Created
January 11, 2012 19:50
-
-
Save tobias/1596428 to your computer and use it in GitHub Desktop.
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 '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