Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Method-Ready Pool of stateless session bean

Reply
Thread Tools

Method-Ready Pool of stateless session bean

 
 
gk
Guest
Posts: n/a
 
      02-20-2007
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 ?

 
Reply With Quote
 
 
 
 
Bobsparks@excite.com
Guest
Posts: n/a
 
      02-20-2007
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

 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      02-20-2007
gk wrote:

> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EJB3: Passing a stateful bean to a stateless service Rob Dennis Java 1 04-14-2008 08:06 PM
J2EE: why do we need more than 1 instance for servlet & stateless session bean? mingclee1@gmail.com Java 7 08-08-2005 03:41 PM
How to use Transactions in stateless session bean? harry Java 4 11-26-2004 02:23 PM
Re: How to read a text file from a stateless session bean's jar file? Rudolf Java 0 06-01-2004 02:37 PM
Stateless session bean that multi threads? davout Java 1 12-11-2003 07:33 PM



Advertisments