Sameer Boddun

Greenhorn
+ Follow
since Nov 05, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sameer Boddun

U should move ur transaction related code to ejbCreate method.
You are right!!, Thanks for helping...
In MDB deployment descriptor we define <max-beans-in-free-pool> and <initial-beans-in-free-pool> elements.
During their deployment the number of beans given in <initial-beans-in-free-pool> tag are created.
For example:
----------------------------------------
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>20</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>quotes</destination-jndi-name>
</message-driven-descriptor>
Here in example <destination-jndi-name> is jndi name for Topic destination.
----------------------------------------
Once the server is started the 20 bean instances are created. And they are ready to receive messages.
because all 20 instances of the bean have subscribed to the single Topic, all the instances should receive the message. But, this is not happening!, only one instance in the pool is receiving message.
I have tried this on Weblogic 6.1 server, and have no idea whether other Application servers allow to create such pools.
Any way, my question is,
1) All the 20 instances have same implementation of OnMessage method, then why we should create the pool? Is the any other advantages, that i am not able to think of?
2) How the server is managing to pass the message to only one instance in the pool, in-spite of the fact that the bean implements MessageListener interface?