• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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 :-).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic