Session Facade

Discussions

EJB design: Session Facade

  1. Session Facade (3 messages)

    Hi all,
       I am using Session Facade. I have a Stateless Session Bean for each CMP. My question is every time I want to perform any database actions Session Bean gets the initial context and does a JNDI lookup for CMP beans. Is this correct? Is there any method to avoid getting initial context and JNDI lookup every time? Can I have local interfaces for CMP beans? I have read about Service Locator design pattern. Does this help in reducing the look up time? Please let me know

    Thanks in advance
    Prasanna

    Threaded Messages (3)

  2. Session Facade[ Go to top ]

    If your slsb and CMP beans are located in side the same jar/ear file then yes you can use locale interfaces




    > Hi all,
    > I am using Session Facade. I have a Stateless Session Bean for each CMP. My question is every time I want to perform any database actions Session Bean gets the initial context and does a JNDI lookup for CMP beans. Is this correct? Is there any method to avoid getting initial context and JNDI lookup every time? Can I have local interfaces for CMP beans? I have read about Service Locator design pattern. Does this help in reducing the look up time? Please let me know
    >
    > Thanks in advance
    > Prasanna
  3. Session Facade[ Go to top ]

    Service Locator is a good pattern for caching home interfaces. Local interfaces only help with the performance of calling of EJB methods and not with the cost of a JNDI lookup.
  4. Session Facade[ Go to top ]

    Does Service Locator pattern handle situations like Server restart? If you provide a Sample implementation of Service Locator pattern it will be great!!

    Thanks
    Prasanna