activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Leyba" <>
Subject Porting from Joram
Date Fri, 10 Mar 2006 11:20:00 GMT

I' m trying to port my joram application to ActiveMQ and I'm
dissapointed and frustrated.

I've runned away from joram because the lack of documentation and
found the same with ActiveMQ (and in Joram documentation is by far
more complete than with activeMQ).  :(

Nevertheless, I'm interested in some features of ActiveMQ and want to
try it having in mine what I want to do is not so difficult and may be
somebody could help me.

I've defined a simple broker like this:


<beans xmlns="">

  <broker useJmx="true">
                <journaledJDBC journalLogFiles="5"

                <transportConnector uri="tcp://localhost:61666" />


My application needs to connect at startup to a RDBM to get topic
names and check if them exists in Publisher. If not, they will be

To accomplish this I used to call Joram AdminModule class that allow
me to connect with the server and get all defined Topics (i'm using
topics not queues), then with a TopicFactory, create nonexistent

After this I used to add binds of topics to Joram JNDI service to
allow it to be recovered at the moment of publish a message.

For example:

AdminModule.connect(publisherHost, publisherPort, "root", "root", 60);
User user0 = User.create("anonymous", "anonymous", 0);
Topic item = (Topic) Topic.create(1, topicName);
javax.jms.ConnectionFactory cf0 =
TcpConnectionFactory.create(publisherHost, publisherPort);

javax.naming.Context jndiCtx = new
jndiCtx.bind(topicName, (Topic) item);

How could I do this with ActiveMQ ???

I've tried to do this:

ActiveMQConnectionFactory connectionFactory = new

javax.jms.Connection connection = connectionFactory.createConnection();

Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

Topic topic = session.createTopic("nuevo1");


but I'm not sure how to continue. I couldn't found examples about how
to retrieve Topics from server, how to get a JNDI server to bind data,
etc, etc.

Could please somebody help me ?

Thanks in advance


View raw message