If the data is read-only and does not need to be persistent,
you could implement a singleton repository that provides public
static methods to get at the shared read-only data.

I don't see the need for transactions, persistence or security here.

This singleton repository would be local and available to all
EJBs in the same container.

We do something very similar to keep initialization&configuration
data available to all stateless session beans (ssb) in a container.
The first  ssb to run must set up all the data, but the other ssbs just
read the data and it is fast&simple.

Hope that helps

    Javier Borrajo
    www.tid.es

>I want to share data between all session beans deployed in the same
>container. This shared data is a cache of the results of previous
>requests to any of the session bean's instances, so it must be fast.
>
>Is there any prohibition against accessing static fields in your bean?
>Or against doing my own synchronization against these fields?
>
>
>--
>David Michaels <[EMAIL PROTECTED]>
>Director of Technology
>ShockMarket Corporation (650) 330-4665

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