The best way to create a queue is to subscribe to it or to publish a message to it. The broker will create the queue automatically when either of those two things happen. On Mar 17, 2016 12:24 PM, "zappee" <arnold.somo...@gmail.com> wrote:
> Hi, > > I am preparing my first ActiveMQ environment with WildFly App Server. > I would like to use ActiveMQ as a stand-alone server / external message > broker. > > So I downloaded the latest version of ActiveMQ and ActiveMQ RAR, which is > 5.13.2. According to the docs and guides what I have read I did that: > > *Install ActiveMQ as an external messaging broker:* > 1) Unpack the downloaded apache-activemq-5.13.2-bin.tar.gz package > 2) Start a broker:<ACTIVEMQ_HOME>/activemq start > 3) Testing the installation: http://127.0.0.1:8161/admin > > *Install the WildFly Application Server* > 1) Set up WildFly Application Server > 1.1) Download WildFly Application Server > 1.2) Unpack the downloaded wildfly-9.0.2.Final.tar.gz package > 1.3) Create an administrator user > > 2) Install ActiveMQ > 2.1) Copy activemq-rar-5.13.2.rar to <WILDFLY_HOME>/standalone/deployments/ > directory > 2.2) Configure the WildFly resource adapter subsystem > Edit <WILDFLY_HOME>/standalone/configuration/standalone-full.xml file and > add this snippet into the subsystem <subsystem > xmlns="urn:jboss:domain:resource-adapters:3.0"/>: > > <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"> > <resource-adapters> > <resource-adapter id="activemq"> > / > <archive>activemq-rar-5.13.2.rar</archive> > > <transaction-support>XATransaction</transaction-support> > <config-property > name="UseInboundSession">false</config-property> > <config-property > name="Password">defaultPassword</config-property> > <config-property > name="UserName">defaultUser</config-property> > <config-property > > name="ServerUrl">tcp://localhost:61616?jms.rmIdFromConnectionId=true</config-property> > <connection-definitions> > <connection-definition > class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory" > jndi-name="java:/ActiveMQConnectionFactory" enabled="true" > pool-name="ConnectionFactory"> > <xa-pool> > > <min-pool-size>1</min-pool-size> > > <max-pool-size>20</max-pool-size> > > <prefill>false</prefill> > > <is-same-rm-override>false</is-same-rm-override> > </xa-pool> > </connection-definition> > </connection-definitions> > <admin-objects> > <admin-object > class-name="org.apache.activemq.command.ActiveMQQueue" > jndi-name="java:/jms/queue/test-queue" use-java-context="true" > pool-name="test-queue"> > > <config-property > name="PhysicalName">jms/queue/test-queue</config-property> > </admin-object> > </admin-objects> > </resource-adapter> > </resource-adapters> > </subsystem> > / > 2.3) Start server: <WILDFLY_HOME>/bin/standalone.sh -c standalone-full.xml > 2.4) Configure EJB3 container to use ActiveMQ resource adapter: > Configuration > Subsystems > EJB 3 > View > Container > Edit > Default > resource adapter: activemq > > The communication protocol between WildFly and ActiveMQ is tcp (this is the > default setting). WildFly is starting properly without any exception. > > WildFly log: > /... > [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: > Starting deployment of "activemq-rar-5.13.2.rar" (runtime-name: > "activemq-rar-5.13.2.rar") > [org.jboss.as.connector.deployment] (MSC service thread 1-2) WFLYJCA0007: > Registered connection factory java:/ActiveMQConnectionFactory > [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-2) > IJ020016: Missing <recovery> element. XA recovery disabled for: > java:/ActiveMQConnectionFactory > [org.jboss.as.connector.deployment] (MSC service thread 1-2) WFLYJCA0006: > Registered admin object at java:/jms/queue/test-queue > [org.jboss.as.connector.deployment] (MSC service thread 1-1) WFLYJCA0002: > Bound JCA AdminObject [java:/jms/queue/test-queue] > [org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0002: > Bound JCA ConnectionFactory [java:/ActiveMQConnectionFactory] > [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010: > Deployed "activemq-rar-5.13.2.rar" (runtime-name : > "activemq-rar-5.13.2.rar") > [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management > interface listening on http://127.0.0.1:9990/management > [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console > listening > on http://127.0.0.1:9990 > [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full > 9.0.2.Final (WildFly Core 1.0.2.Final) started in 6246ms - Started 278 of > 458 services (220 services are lazy, passive or on-demand) > / > > My expectation was that the jms/queue/test-queue (which is configured in > the > standalone-full.xml) will appear on the activemq web console after WildFly > is started. But the queue list is totally empty on ActiveMQ web console. So > I suppose that the communication between wildfly and activemq does not > work. > > What is the problem here? > Is there any way to check how fine the tcp://localhost:61616 communication > works? > > > What is the best way to add a new queue? Can i use activemq concole to add > a > new queue? Or I need to add new jms queue definition into the > standalone-full.xml file? Or booth have to work? > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/external-ActiveMQ-5-13-2-WildFly-9-0-2-tp4709579.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >