The Artima Developer Community
Sponsored Link

Java Buzz Forum
JRuby Rocks

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
JRuby Rocks Posted: Nov 15, 2006 11:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: JRuby Rocks
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

So, trying to reproduce a timing issue in ActiveMQ failover (which Hiram seems to have fixed in the recent 4.0.2 release, thank you!) I was able to whip various clients together super-quick:

#!/usr/bin/env jruby
require 'java'

module AMQFailoverTest
  include_package "org.apache.activemq"
  include_class "javax.jms.Session"

  b = "failover://(tcp://golem:35000,tcp://golem:35001)"
  factory = ActiveMQConnectionFactory.new b
  connection = factory.createConnection();
  session = connection.createSession(false, Session::AUTO_ACKNOWLEDGE)
  producer = session.createProducer(session.createTopic("test"))

  loop do
    producer.send(session.createTextMessage("this is only a test"))
  end
end

Thank you, JRuby folks! :-)

Read: JRuby Rocks

Topic: Tutorial: Introduction to Servlet Listener using NetBeans Previous Topic   Next Topic Topic: Spiderman 3 Trailer

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use