QMF#4: Ruby accessing EJBs running in JBoss

Posted: July 7, 2009 in geek stuff

This is the latest in a series of posts on using qmf consoles in various languages to connect to EJBs running in a JBoss 5 container. There hass been python, C#, and Java. Now, lets add ruby to the list. Steps for building and deploy the Java agent can be found in the Java article. I will assume you have a running agent, a running broker, the latest qpid code, and would like to use the rby console now.

The current ruby console uses some native ruby extensions, so you first need to build those. Make sure you have ruby and rake installed

cd qpid/qpid/ruby/
rake build
export RUBYLIB=[QPID_SOURCE_LOCATION]/qpid/ruby/lib:[QPID_SOURCE_LOCATION]/qpid/qpid/ruby/ext/sasl/ 

Assuming you have the latest version of the git example code cloned from github, you can now run the following:

cd qmfExample/rubyConsole
ruby qmfExample.rb

You will see the same method calls, and XML Schema generated as from the earlier languages. A very easy way to expose your java code to many different languages.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s