• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why onMessage is being called on application server startup?

 
John Fairbairn
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have deployed a MDB in JBoss 2.4.4. When the application server starts, the newInstance(), setMessageDrivenContext(), and ejbCreate() methods are invoked by the container like I expected (because of initial beans being created in the pool). But, the onMessage() method is also being called - why is this the case if I haven't posted a message to the JMS queue the MDB is listening to?
Also, I'd like to know where we can specify the initial number of beans in the pool for an MDB - I thought this would be in the jboss.xml file?
Thanks in advance for your help.
 
Bill Siggelkow
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are dealing with a persistent queue, it could be that there are undelivered messages that are being sent. You may want to check the JBoss forums at http://www.jboss.org.
 
Stu Glassman
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible that a "create" message is being passed. Try getting the message and looking at its contents.
-Stu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic