multiple home lookups


EJB design: multiple home lookups

  1. multiple home lookups (2 messages)

    In case of stateless Session Beans, we have multiple lookups for Home for different Business methods inside wrapper class. Would this result in too much memory consumption ?
    JNDI llokup only returns reference to Home Object so I don't think it is resource intensive process. If we look up again for same Home , it shouldn't consume too much memory . Can anyone clarify ?

    Threaded Messages (2)

  2. multiple home lookups[ Go to top ]

    It's not the memory required, but the performance hit introduced by fetching the home interface from JNDI for every call. One of the most efficient ways of improving performance of EJB applications is to cache home interfaces.

    Of course this has some glitches, e.g. what if the EJB is updated and the home interface needs to be sync'ed, and so on.
  3. multiple home lookups[ Go to top ]

    I use a utility class to do home lookups and cache the home objects on the first call. To handle the situation where the EJBs are updated (hot deployed in WebLogic terms), I have a method to clear the cache. The catch is that the application has to catch the weblogic.ejb.internal.RedeploymentException when it tries to invoke a method on the "old" EJB. I wish there was a more portable way to do this.