I think you can use RMI to implement this pattern without conflicting
programming restrictions. RMI objects can be local to a given server (in
this case there will be no RMI overhead), or you can have singleton in a
cluster by pinning the object to one of the servers.

On Tue, 26 Sep 2000, Luis Canals wrote:

>         public class MySingleton {
>                 private static MySingleton instance;
>                 public static Singleton getInstance() {
>                         if(instance==null) instance = new MySingleton();
>                         return instance;
>                 }
>                 // Non-static methods...
>         }
>
>         Now, from our EJBs, we access to this singleton through this code:
>                         MySingleton the_instance =
> MySingleton.getInstance();
>                         the_instance.aMethod();
>

Dimitri
http://dima.dhs.org

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