Discussions

EJB design: Distributed Object Repository

  1. Distributed Object Repository (1 messages)

    Hi all,

    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:

    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;

    2- Use a Stateful Session Bean. But in this case, how can I have the garantee that all my clients will access the same instance of the bean? Can I use JNDI to keep the EJB´s handle?

    3- Use an Entity Bean. I really don´t know Entity Beans at all. So, I don´t even know if it could help me anyway. Any ideas?

    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.

    Thanks in advance,
    Daniel
  2. Distributed Object Repository[ Go to top ]

    Hi Daniel,

    > 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.).

    Later,
    Rob Misek
    Tangosol, Inc.
    Coherence: Cluster your Work. Work your Cluster.