• 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

How to check the MDB Pool size in JBOSS 5.1.0.GA

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

I had written some code to configure the Size of the MDB.



I have some Question regarding to above code

1) Can any body please explain when MDB's are created(i.e creating MDB pool), I mean MDB's are created while Jboss is coming up (or) When any new Message comes to Queue?
2) Where can I check how many MDB's are Created in Jboss. (admin-console or jmx-console) ?
3) According to the Above code I specfied the maxSize=50 where can I check how many MDB's are used and how many MBD's are free?

Please help me in this....

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) As new messages come into the queue. You won't get additional MDBs until the existing ones cannot handle the load. For example, if you get a message per second, and it takes less than a second to process a messages, only one MDB will be created. But it you get 10 messages per second and it take about a second to process a messages, you will end up with 10 MDBs.

2&3) Nowhere that I know of. I use an AtomicInteger within my MDB to keep track of each one, and to know how many there are.
 
vijay sachin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Peter Johnson: Thank you very much for the reply

I need to check what is this AtomicInteger, first time I heard about this.
may be I will also try to track MDB's using this AtomicInteger....
 
vijay sachin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one more doubt in MDB pool.

In my present code, there is MDB constructor which will create KnowledgeBase Object (Noting but reading drools xsl file) Which takes
some 10 to 15 Sec time, which is expensive.

As per my observation JBOSS is calling that constructor when ever message come.

But the purpose of writing that constructor is, before any message comes to the queue JBOSS should have to Invoke the constructor it should not be like message comes
invoke the constructor.

Is there any way to create the pool of MDB Objects when Jboss comes UP? (i.e Constructor Should be called before)

Please help me if some body knows......
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to consider writing a service that on startup submits 15 messages so that the MDBs get initialized. Here is an example startup service:
http://community.jboss.org/wiki/ExampleHelloWorldService
reply
    Bookmark Topic Watch Topic
  • New Topic