We have two problems here to solve.
1.One is a way to provide a singleton server side class that is persitent.
2.Second problem is to provide a way of cacheing the data of a table in this
singleton class which is always in-synch with the table.
Solution:
Use a Singleton class that is available remotely.(we need this since the
singleton class may be accessed from other JVM's).This can be done either in
CORBA or in RMI.
Access the table ( data that controls the flow of the application ) using an
EntityBean( so any update on this table is done through this EntityBean). In
this EntityBean insert the code that updates the cached data in the
singleton class in ejbStore() function.
-Sesh
>>-----Original Message-----
>>From: A mailing list for Enterprise JavaBeans development
>>[mailto:[EMAIL PROTECTED]]On Behalf Of Edward Barrett
>>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
>>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
===========================================================================
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".