How about using and entity bean that talks to a stateless session bean (where the
information is cached).

The reason for the entity bean is that session beans methods cannot be called
concurrently by the client.  An entity bean will prevent concurrent calls to the
session bean.

I also wonder about item 2 below.  I would want to somehow configure the stateless
bean to always leave between 1 and n instances in the pool where I decide n.  Do
any vendors provide that capability?

What are other alternatives for this?  This seems to be a very common question that
is not really answered in the Sun Blueprints.

dan

Ingo Schuster wrote:

> Hi everybody,
>
> I'm currently working on my diploma thesis "Application Architectures with the
> J2EE". One of the issues I want to work on is about database caching. A
> question I'm currently facing is the following:
>
> For performance issues, one could try to cache records of a read-only database
> in an EJB. However, this might raise some new problems, some questions at
> least:
>
> 1. What type of EJB is is best suited for this job: Entity or Stateless Session
> (Stateful Session doesn't make sense, I think)?
> 2. If I choose a stateless session bean:
>    - Will I get trouble with timeouts (the container removes the bean and I
> have to "save the cache")?
>    - The container could create several intances of this session bean or can I
> make sure that only a certain number is instantiated?
> 3. Is there an alternative to using EJBs - e.g. servlets ? But in that case my
> application would needed be accessed through the webtier - a stand-alone
> application accessing the EJB tier directly couldn't use the caching, right?
>
> If anybody has some ideas about this questions, I would be grateful for some
> help!
>
> ingo.
>
> ===========================================================================
> 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".

===========================================================================
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".

Reply via email to