• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

MDB not recieving the message not throwing any exception

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Reza and Ranchers,

This is my MDB code




and below is my JMS message sender code




I have added the following entry in jbossmq-destinations-service.xml



My JMS sender sends the message but my MDB never reads the message not I am getting any exceptions

You help would be appreciated.

Thanks,
Hash
 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your MDB code, you are not doing lookup for Destination. :idea:
 
hashmukh punamia
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amandeep,

The destination is already there in the activationConfig.
I dont think we will have to do that explictly when one is using annotations for the same

Thanks,
Hash
 
author
Posts: 580
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hash,

Not sure exactly what might be going wrong. Try taking a look at our JBoss example code/build scripts for the book. Perhaps the MDB is not packaged/deployed correctly?

Cheers,
Reza
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of JBossAS? Please post the entire console logs. How do you start the JBoss server and how do you deploy the application and the queue?
 
hashmukh punamia
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Reza and Pai,

Thanks for your quick reply.

I am using Netbeans6.1RC2 to create a independant EJB module with the MDB code. My EJB module only consists of a MDB.
Then I deploy the ejb module in JBoss4.2.2GA.





Now I create a seperate web application project to which I have added a java class (MessageProd.class) running the JMS code similar to the sample code provided in EJB3 in action book.
I am adding the jar file to my library just to get the TestMessage.class.



When I execute the client code I dont get any output on the server.

I have added the following entry in jbossmq-destinations-service.xml




Also my server startup logs


Please let me know if I am wrong somewhere

Thanks in advance

Thanks,
Hash
 
hashmukh punamia
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Reza,

Its working now.
Able to see the messgae on the console now.

1)
session = conn.createSession(true, Session.AUTO_ACKNOWLEDGE);

The first param should be false

and 2) havent started the connection

Thanks & Regards,
Hash
 
Reza Rahman
author
Posts: 580
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hash,

Glad it worked out.

Best regards,
Reza

P.S.: Please do me a big favor and kindly avoid addressing questions to me directly (especially in the thread starter ) on the JavaRanch forums. The reason is that I am merely just another "Rancher" here, so it looks a little out-of-place and makes me a tiny bit uncomfortable. I try my best to keep an eye on posts anyway and respond when I think it is needed :-). That being said, you can address me directly all you want on the Manning EJB 3 in Action Author Online Forum: http://www.manning.com/panda/. And I understand and appreciate the gesture :-).
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic