wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes how to configure jboss  for jms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "how to configure jboss  for jms" Watch "how to configure jboss  for jms" New topic

how to configure jboss for jms

djyoti sahu

Joined: Jan 28, 2003
Posts: 26
please tell me what are the files i have to configure for jms.
where will i mention jndi name of destination and connection factory.

with regards
norman richards
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
To configure a queue or a topic, create a service.xml file. (myqueue-service.xml, for example) There are some examples of how to do it in jbossmq-destinations-service.xml in your deploy directory. In fact, you could put your own definitions in that file, but I like to create my own service files for them.

Here is an example from the jboss distribution:

This queue's jndi name would be "queue/ex". You could look it up like that and use it directly (the connection factory is "ConnectionFactory") if you want. To link it to a MDB, add this in the enterprise beans section of your jboss.xml file:

It's pretty straightforward
djyoti sahu

Joined: Jan 28, 2003
Posts: 26
norman richards,

Thanks for suggestion.
i am getting some Exception during deployment.
I am using mysql as database.

my files are



<!-- client code -->
javax.naming.Context ctx = new InitialContext();
QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
//create a connection
QueueConnection qConn = qcf.createQueueConnection();
//creater session
QueueSession qSession = qConn.createQueueSession(false,1);
//create a sender
Queue q = ( Queue ) ctx.lookup("queue/ex");
QueueSender sender = qSession.createSender(q);
//after message received from the quue the message will be removed from message queue
//QueueSender receiver = qSession.createReceiver(q);
//delivery message
TextMessage msg = qSession.createTextMessage();
msg.setText("i will set mesage here ");

<!-- mdb code-->
i am getting exception at time of exception
javax.jms.JMSException: Error creating the dlq connection: XAConnectionFactory not bound
at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:169)
at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:458)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:674)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:234)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)

with regards
Uday Dattani

Joined: Jun 03, 2004
Posts: 1
I was having the same problem. I had deleted the hsqldb-ds.xml file from my
deploy folder. I just learnt that this file which configures access to the hypersonic database is used by jboss to keep jms related data.

Just add the hsqldb-ds.xml file to your deploy folder and try reinstalling your application. This sholud work
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: how to configure jboss for jms