[jboss-user] [Messaging, JMS & JBossMQ] - Strange Problem!!!

vijayaraghava do-not-reply at jboss.com
Thu Oct 19 05:15:06 EDT 2006


     Iam sending messages to a queue(MyQueue) using JMS and MDB is consuming them. But the problem is that the MDB is not getting invoked for all messages and this doesn't happen all the time. Sometimes it works perfectly fine and sometimes it doesn't consume any messages or just consumes only some of the messages. I think the configuration is fine.

     Iam using JBoss 4.0.4, EJB 3.0, JavaEE 5.0

   Relevant snippets of configuration files and code are as follows:

   1) jbossmq-destinations-service.xml  --- added a new queue
         <depends optional-attribute-name="DestinationManager">

   2)  Code using JMS API

           context = new InitialContext();
           connectionFactory =  
	   destinationName = "queue/MyQueue";
	   Queue testExecutionQueue = 
	   connection = connectionFactory.createConnection();
	   session = connection.createSession(false, 
           msgProducer = session.createProducer(testExecutionQueue); 
           ObjectMessage message = session.createObjectMessage();
           // Close the connection

     3)  MDB 

             // Only the annotations  --- others are not required I guess

       @MessageDriven(activationConfig =  {
       propertyValue="queue/MyQueue")    })

     Thats it. In the JBoss configuration file, I only changed the file mentioned in 1). 

       The problem is strange because it happens sometimes and works perfectly at other times.

       Where am I going wrong? 

      Thank you.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979290#3979290

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979290

More information about the jboss-user mailing list