The Method-Ready Pool
Stateless bean instances enter the Method-Ready Pool as the container
needs them. When the EJB server is first started, it will probably
create a number of stateless bean instances and enter them into the
Method-Ready Pool. (The actual behavior of the server depends on the
implementation.) When the number of stateless instances servicing
client requests is insufficient, more can be created and added to the
pool
i still dont understand the meaning of method ready pool ....whats
the difference between bean/instance pool and method ready pool ?
are they same ?
look it says .."...it will probably create a number of stateless bean
instances and enter them into the Method-Ready Pool..."
they did not explain what does it mean by Method-Ready Pool .
can you please explain ?
Bobsparks@excite.com - 20 Feb 2007 14:33 GMT
The specification says that beans must have a Constructor with no
arguments. This usually means it is constructed without any useful
data . So you must call a method after to get some useful data into
the object. Consider You construct an employee object with no
arguments, all you can do is reserve space for a string for his name,
a number for his department but you don't know what it is. Later you
can call initialize(123) where 123 is an employee number, you can then
look up the name and number from the database and start using the
employee object. I have been in the Java business for ten years and
never seen a business case where this paradigm might be useful but it
sure seems popular.
Bob
Chris Uppal - 20 Feb 2007 17:46 GMT
> i still dont understand the meaning of method ready pool ....whats
> the difference between bean/instance pool and method ready pool ?
> are they same ?
As far as I can tell, the term "instance pool" is used for all EJBs, but the
term "method ready pool" is used only in in the case where the EJB is a
stateless session bean. If so, then the two mean essentially the same thing.
The only reason for distinguishing the two at all is that the container handles
the two classes of bean rather differently (the lifecycle of entity beans and
stateless session beans is similar but not identical). So, when you have
different kinds of enterprise beans, you have different kinds of pools to put
them in.
-- chris