Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Why onMessage is being called on application server startup?

 
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.
 
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.
 
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
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic