• 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 instantiated? Not seeing onMessage (stdout messages) - why?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am debugging my JBOSS JMS application.

I have a single class with following messages. I have just provided the skeleton of the classes to give an idea;

public JMSMessageDrivenBean extends MDB, MessageListener {

ejbCreate() {
system.out.println("created") ;
}

onMessage(Object msg) {
System.out.println("Inside onmessage") ;
}

}

public class JMSMessenger {
pulic void sendMessage(String text) {
// init the connection factory etc.
sender.send(text) ;
}

public List getMessages() {
receiver.receive(timeout) ;
//
}
}

ejb-jar.xml and jboss.xml both are deployed under (like this, example)

app.ear
webapp.war
+WEB-INF/
+ classes/
+ META-INF/ejb-jar.xml, jboss.xml

MDB is configured in ejb-jar as 'container'.

When I run the application. One of my jsp calls JMSMessenger.getMessages() which returns a list of messages from queue receiver.

To send messges from my thread application, I call the same JMSMessenger.sendMessage("some message") ;

I see that the messages are send/received. But I dont see onMessage being executed even once. I dont see the ejbCreate being executed as well. The system.out.pritln messages I put in my MDB is not printed at all.
There are no log files and when I pring System.out from my app it goes to server.log.

I am using jboss3.2.x version.

Can anyone please tell me why my MDB methods are not called? Is something wrong with this application.

Any help will be greatly appreciated?

Thanks.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic