Method-Ready Pool of stateless session bean

G

gk

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 ?
 
B

Bobsparks

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
 
C

Chris Uppal

gk said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top