qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robbie Gemmell <robbie.gemm...@gmail.com>
Subject Re: QPID and HermesJMS
Date Tue, 02 Apr 2013 14:08:59 GMT
Hi,

I was able to get HermesJMS to connect to the Java broker by configuring it
via its generic JNDI connection factory configuration rather than trying to
use its Qpid plugin, which it seems has some issues.

I set up a ClassLoader with the Qpid jars in it, then referred to that when
creating a generic hermes JNDI connection factory with the following
properties:

binding = default
initialContextFactory =
org.apache.qpid.jndi.PropertiesFileInitialContextFactory
providerURL = file:///path/to/jndi-file.properties

Then in the above referenced jndi-file.properties, I put the connection
details, and any queue/topic definitions (I only tried a queue). For
example:

# connectionFactory.<lookup_name> = <connection_details>
connectionfactory.default = amqp://guest:guest@clientid
/test?brokerlist='tcp://localhost:5672'

# queue.<lookupName> = <queue_name>
queue.exampleQueue = MyQueueName

#topic.<lookup_name> = <topic_name>
topic.exampleTopic = MyTopicName

I was then able to use the objects created from this to send a message to a
queue and view messages on the queue. How fully it works or what might not
be available from only using the generic approach I dont know, as thats
everything I have done with it.

Robbie

On 26 March 2013 08:15, Aage Nielsen <ani@openminds.dk> wrote:

> We are struggling with HermesJMS and QPID. When connecting from HermesJMS
> the connectionurl appears to be ignored or is incorrect. QPID is up and
> running and we can connect through JConsole.
>
> Connectionurl: tcp://localhost:5276
>
>
> javax.jms.JMSException: The connection factory wasn't created with a proper
> URL, the connection details are empty
> at
>
> org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:112)
> at
>
> hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:122)
> at
>
> hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:92)
> at
>
> hermes.impl.jms.ConnectionSharedManager.reconnect(ConnectionSharedManager.java:81)
> at
>
> hermes.impl.jms.ConnectionSharedManager.connect(ConnectionSharedManager.java:91)
> at
>
> hermes.impl.jms.ConnectionSharedManager.getConnection(ConnectionSharedManager.java:104)
> at
>
> hermes.impl.jms.ConnectionSharedManager.getObject(ConnectionSharedManager.java:142)
> at
>
> hermes.impl.jms.ThreadLocalSessionManager.connect(ThreadLocalSessionManager.java:190)
> at
>
> hermes.impl.jms.ThreadLocalSessionManager.getSession(ThreadLocalSessionManager.java:570)
> at
>
> hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:460)
> at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:367)
> at
>
> hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:141)
> at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
> at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
> at java.lang.Thread.run(Thread.java:680)
>
> Any clues ?
>
>
>
> Venlig hilsen / Best Regards
>
>
> Aage Nielsen
>
>
> Fredens Torv 1B, 1.
> DK-8000 Aarhus C
> Denmark
> Cvr; 33647166
> M: +45 5390 1639
> E: ani@openminds.dk
> www.openminds.dk
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message