> I want to know how to implement a distributed object repository using J2EE
> architecture. My real need is to have a unique repository in a single server > that many clients can share. My first ideas:
Take a look at Tangosol's Coherence
Clustered Caching/Data-Management product. It supports Distributed (partitioned) caching of objects across all (or a subset) of "nodes" participating in the cluster.
> 1- Publish the services add/removeObject with a Stateless Session Bean. The > bean would use a singleton (static) Map to keep the information. The problem > is: I think it wouldn´t work within a clustered server;
Here is a Clustered Singleton
example built with Coherence.
> I don´t want to use database to keep that information because there is a
> timeout mechanism that I have already implemented for a Map and I don´t want > to reimplement it for DB.
Coherence provides the developer with functionality to manage the properties of the underlying or backing cache including the stardard TLA's (MRU, MFU, etc.).
: Cluster your Work. Work your Cluster.