Doubt in EJBFactory Pattern implementation


EJB programming & troubleshooting: Doubt in EJBFactory Pattern implementation

  1. Doubt in EJBFactory Pattern implementation (1 messages)

    Hi all,
           I was going throught the book Ejb Design Patterns and found EJB Factory Pattern very useful for my project. But I have one doubt in the implementation of this pattern.
    It is as follows.
           I have three different machines Mac1,Mac2 and Mac3 on which I am deploying 3 different beans lets say Bean1,Bean2 and Bean3 respectively. When I deploy them they get registered in the JNDI of that respective machine only. But what I want is whenever client sends a request to EjbHomeFactory for a particular object(deployed on different machine) it should be able to lookup that object on that machine and get reference of the Home object from that(remote) machine. I think this a generic scenario for any distributed application i.e all the objects are registered on different machines and client should send the lookup request to only one machine(Because we want that if the object gets deployed to any other machine then also client code shouldn't change.).

    I am using Jboss-3.2.3 application server. If any how I can register an object deployed on Mac1 in the JNDI running on any other machine(Let's say Mac4) then my problem is served.

    Hoping for earliest reply and thanking you in advance
    Kiran Bajaj.
  2. Just modify the pattern to include machine address as well as JNDI name in the configuration for your factory.