ziggy
ziggy

Reputation: 15876

Adding a JMS Queue to Jboss 7

I want to try and get an understanding of how JMS works. I am going through a tutorial and have created the Producer/Consumer java classes but not sure how to create the JMS queue. I downloaded jboss-as-web-7.0.2.Final which i believe has HornetQ. I have not got anywhere so far as i just cant figure out how to add a Queue.

According to this document https://docs.jboss.org/author/display/AS7/Messaging+configuration , a queue can be added by using the add-jms-queue command. I tried it but it generates an error.

[standalone@localhost:9999 /] add-jms-queue --name=sampleQueue --entries=queue/sampleQueue

The command is not available in the current context (e.g. required subsystems or connection to the controller might be unavailable).

I also cant find an option to add the queue via the admin console on the GUI.

Any ideas?

Thanks

Upvotes: 7

Views: 13097

Answers (3)

Steffen
Steffen

Reputation: 2642

For other people which have the same message while using JBoss 7.1.x:

You should add the in the file standalone/configuration/standalone.xml a new subsystem for JMS (<subsystem xmlns="urn:jboss:domain:messaging:1.1">). You can look into the standalone/configuration/standalone-full.xml for that subsystem or simple use the standalone-full.xml.

And you should use the following command:

jms-queue add --queue-address=MyQueue --entries=queue/MyQueue,java:/jms/myApp/MyQueue

EDIT:

On WildFly you need may be also to add

<server xmlns="urn:jboss:domain:3.0">
  <extensions>
      ...
      <extension module="org.jboss.as.messaging"/>
  </extensions>
</server>

Upvotes: 4

Dulanga Sashika
Dulanga Sashika

Reputation: 173

Although the JMS configurations are now in standalone-full.xml, we can configure standalone.xml to get JMS queue support. You can follow the steps mentioned in CONFIGURE A JMS QUEUE IN STANDALONE.XML OF JBOSS AS7 . After configuring this, you can start JBoss server with standalone.xml configurations.

Upvotes: 0

viktor
viktor

Reputation: 1297

If you have JBoss 7 web (Java EE6 Certified), It doesn't contain JMS implementation (HornetQ) as it has not been approved yet. JBoss 7 Everything (NOT Java EE6 Certified) contains JMS implementation.

Upvotes: 5

Related Questions