I am using Entity beans to retreieve data from the DB and put it in a
server-side cache.  I'm using Weblogic EJB server.  In this server
there is something called a named workspace. You can add objects to the
server-side workspace. This acts like a hash table storing the object
instance with a key that you specify.
Also, in Web Logic I can create a startup function that the server will
run(when the server is started) before it is ready to accept transactions.
I add the code to get the
entity beans using a "find" method and load then to the weblogic's
named workspace.  I dont store the entity beans themselves but create
serializable java objects which can contain the data in the entity bean.
i do this to prevent overheads when clients access the server side workspace.
i.e. the client dont need to lookup and use remote interfaces
My client applications use a singleton facade to retrieve the cached data objects.
The facade can do client-side caching too for performance gains.
It can then check its cache(client-side) to see if the object already exists
, else it can connect to the EJB server and retrieve the object from the server-side 
cache and store
it in the client-side one.  The only real issue is what if the data
in the database ever changes. Event based Refresh mechanisms will then need to be
designed to refresh all server and client side caches.

Hope this helps

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