Hi
I think u can try something like this
public class Cache
{
   private static HashMap dataStore = new HashMap();

   static
   {
      //retreive the data previously persisted in the disk
   }

   public static Object retreiveData(String key)
   {
      ......
   }

   public static void storeData(String key, Object value)
   {
        ..............

   }
}

this class can be used for storing and retreiving data and it is not a bean
-- so the ejb container won't do anything with it. You can also persist the
data in hard disk(given that the data objects stored is serializable) at
regular time intervals.

cheers
Anamitra
-----Original Message-----
From: Edward Barrett [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 14, 2000 8:10 AM
To: [EMAIL PROTECTED]
Subject: 'static' data in EJB architecture


I have a requirement to have data stored in a database which will be
accessed from numerous session beans and servlets (it is the data that
controls the flow of the application, but could easily be a list of valid
choices, etc.).

Ideally, I would like to be able to implement a class that resides in the
server for the length of the server instance's runtime, but which also has a
way of being 'refreshed'.

I thought about stateless session beans which, upon their creation obtained
the data and cached locally.  Can I configure my server so that there are a
minimum number of beans and so they stay resident ?  Can the server still
passivate the bean and therefore wipe the data ?

For the 'refresh' functionality, is there a manner to issue a message to all
the stateless session beans to notify them to refresh ?

Is there another design for this requirement ?

As always, TIA

Ed

PS How do I find the archive for this mailing list ?  Also, to which URL
does one go to register for the list ?


------------------------------------------------------------------------
Graham Parsons
Reflective Solutions Limited, London, UK
Tel: 07976 150940  E-mail: [EMAIL PROTECTED]
http://www.reflective.co.uk
------------------------------------------------------------------------

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


STATEMENT OF CONFIDENTIALITY.   The information contained in this electronic
message and any attachments to this message are intended for the exclusive
use of the addressee(s) and may contain confidential or privileged
information. If you are not the intended recipient, please notify
USPowerSolutions Corporation immediately at (617) 547-3800, or at
[EMAIL PROTECTED], and destroy all copies of this message and any
attachments.

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