Remote interface


EJB design: Remote interface

  1. Remote interface (4 messages)

    While getting the home interface instance on the client-side, the same instance is returned to all the clients. Generally, we use EJBHomeFactory pattern for this. What if we use the same kind of Factory pattern for Remote Interface?

    Threaded Messages (4)

  2. Remote interface[ Go to top ]

    Hi Dhiraj,

    the home instance you got is the factory of your remote interface.
    and concerning this instance i think that we use the singleton pattern.

    BENMIRA Nabil
  3. Remote interface[ Go to top ]

    I suppose you could think of the home stub as a proxied singleton proxy factory; i.e. it exposes the contract of a singleton factory to a client; the factory generates proxies (remote stubs) for actual business objects. Note that this doesn't imply the existence of a singleton on the server. It just has to appear like one by means of a proxy (i.e. look up a single proxy in JNDI and use it).
  4. Remote interface[ Go to top ]

    Thanks for your replies. My question was can you use singleton pattern for remote interface?
  5. Remote interface[ Go to top ]

    Basically no. Remote objects are not singletons and do not contract to be so. However, if you genuinely want a business object to be a singleton, then you can always implement it as an RMI object.