You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "stephan.praetsch" <St...@googlemail.com> on 2016/06/06 20:13:09 UTC
Broken Documentation for Embedding ActiveMQ
Hi there,
I try to use an embedded JMS broker for a unit test. I found this
documentation about POJO instantiation - Embedding Programmatically
<https://activemq.apache.org/artemis/docs/1.2.0/embedding-activemq.html> .
Unfortunately this is incompatible to the source code (tested with
artemis-jms-server 1.2.0 and 1.0.0).
ConnectionFactoryConfigurationImpl cfConfig = new
ConnectionFactoryConfigurationImpl("cf",
connectorConfig, "/cf");
and
JMSQueueConfiguration queueConfig = new
JMSQueueConfigurationImpl("queue1", null, false,
"/queue/queue1");
don't have a constructor like this. They only have a non-parameter
constructor. Thus I don't know how to set the mentioned values.
Thankful for any help.
Regards
Stephan
--
View this message in context: http://activemq.2283324.n4.nabble.com/Broken-Documentation-for-Embedding-ActiveMQ-tp4712696.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Broken Documentation for Embedding ActiveMQ
Posted by "stephan.praetsch" <St...@googlemail.com>.
Thank you. Both EmbeddedExamples work!
For the sake of completeness :)
ConnectionFactoryConfiguration cfConfig = new
ConnectionFactoryConfigurationImpl().setName(
"cf").setConnectorNames(connectorNames).setBindings("cf");
and
JMSQueueConfiguration queueConfig = new
JMSQueueConfigurationImpl().setName("queue1")
.setDurable(false).setBindings("queue/queue1");
--
View this message in context: http://activemq.2283324.n4.nabble.com/Broken-Documentation-for-Embedding-ActiveMQ-tp4712696p4712763.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Broken Documentation for Embedding ActiveMQ
Posted by Justin Bertram <jb...@apache.com>.
Looks like that bit of documentation got missed as the broker changed/matured. The configuration API is "fluent" now so the only constructors take no arguments.
I'll update the documentation. In the mean-time you can look at the "embedded" example shipped with Artemis.
Justin
----- Original Message -----
From: "stephan.praetsch" <St...@googlemail.com>
To: users@activemq.apache.org
Sent: Monday, June 6, 2016 3:13:09 PM
Subject: Broken Documentation for Embedding ActiveMQ
Hi there,
I try to use an embedded JMS broker for a unit test. I found this
documentation about POJO instantiation - Embedding Programmatically
<https://activemq.apache.org/artemis/docs/1.2.0/embedding-activemq.html> .
Unfortunately this is incompatible to the source code (tested with
artemis-jms-server 1.2.0 and 1.0.0).
ConnectionFactoryConfigurationImpl cfConfig = new
ConnectionFactoryConfigurationImpl("cf",
connectorConfig, "/cf");
and
JMSQueueConfiguration queueConfig = new
JMSQueueConfigurationImpl("queue1", null, false,
"/queue/queue1");
don't have a constructor like this. They only have a non-parameter
constructor. Thus I don't know how to set the mentioned values.
Thankful for any help.
Regards
Stephan
--
View this message in context: http://activemq.2283324.n4.nabble.com/Broken-Documentation-for-Embedding-ActiveMQ-tp4712696.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.