Most of the EJB books encourage us to use Stateless session beans for
reusable queries.
I however have a doubt regarding this.
If I encapsulate my query say in getMemberInfo(String Id) which happens to
be one of my business methods of a stateless session bean, then I understand
that every time a client comes to my site and wants to view his info then my
session bean is going to make a DB hit. Assuming that my site receives
100000 hits per second or say atleast 100 hits per second then each time my
session bean will have to hit the DB. And hitting the DB and returning the
resultset involves time and also chews up resources. Isn't it?
So knowing all this do I still have to go for session beans? I also assume
that i am using connection pool for picking up DB connections.
If I use my entity bean with a findbyMemberId(String Id) then probably I
would reduce this overhead, because the entity's memory will be loaded with
that particular record. So next time the same user comes then I will not
have to hit the DB ( of course I am assuming that the entity bean is still
present in the server.)
Please give me more insights from ur experience and understanding..
Thanks
> Love
> Gp
> Extn:3471
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".