Hi,
You can cache your data un a Java singleton class (not an EJB), and
implements the
ejbLoad to access this singleton. The singleton class don't have any
timeout.
The singleton must be initialised to load the data in memory from the DB.
So your EJB can be a stateless EJB or stateful, because it supply only an
interface to
the singleton class.
Should works.
Tibo.
>
> 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".