If you want to make a singleton globally accessible, you can try writing an
RMI remote object, not a bean. You can then bind it a JNDI tree using the
RMI registry service provider available from Sun. You may also be able to
use your container's JNDI implementation if it supports binding RMI remote
objects.
--
From: Marc San Soucie <[EMAIL PROTECTED]>
Subject: Re: sharing data between instances of same session bean?
Date: Sat, 19 Jun 1999 15:51:00 -0700
Javier Borrajo wrote:
>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.
In some EJB architectures your beans may be distributed among a number
of distinct Java VMs, possibly on more than one physical machine. The
singleton will have to be remotely accessible if the contents are to
be globally shared. If it's purely read-only, you could establish one
singleton per VM, though getting to it may be an issue.
There is also the question of securing the data, if it needs securing.
Marc San Soucie
GemStone Systems, Inc.
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.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".