I newbie to JMS(java Messaging service). I want to run sample JMS application using jboss 6.
I have tired searching google and got like this. Those link are refer jboss 7.
1.How to configure JMS in jboss 6?
2.Is there Jboss7 have in built-in JMS? or need configure manually?
3.sample Application using Jboss 6?
In Jboss 7 (and 6 as well) you have bundled HornetQ server. In Jboss 6 it is located in deploy\hornetq.sar. If you want to add destination you can specify it in hornetq-jms.xml file:
<topic name="myTopic">
<entry name="/topic/myTopic"/>
</topic>
<queue name="myQueue">
<entry name="/queue/myQueue"/>
</queue>
In Jboss 7 it looks like below:
<subsystem xmlns="urn:jboss:domain:messaging:1.1">
<hornetq-server>
<jms-destinations>
<jms-queue name="myQueue">
<entry name="queue/myqueue"/>
</jms-queue>
<jms-topic name="myTopic">
<entry name="topic/mytopic"/>
</jms-topic>
</jms-destinations>
</hornetq-server>
</subsystem>
You can find more information in HornetQ documentation
Finally i got the link for sample jms application using Jboss 6.x. There are two ways you can configure jms queue in jboss 1.Add message queue details in jboss/server/default/deploy/hornetq/hornetq.jms.xm
<queue name="myQueue">
<entry name="/queue/MyQueue"/>
</queue>
2.create xml file in your workspace and add the message queue details
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:hornetq"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd" >
<queue name="MyQueue2" >
<entry name="/queue/MyQueue" />
</queue>
</configuration>
Maintain this file under META-INF folder of in your workspace.
Refer this sample application.
In this example includes 1.How to configure jms in jboss using hornetq. 2.Sending messages to jms message queue 3.Display messages from jboss server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With