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 ?
-
multiple home lookups (2 messages)
- Posted by: Pravesh Bhargava
- Posted on: September 19 2002 23:47 EDT
Threaded Messages (2)
- multiple home lookups by Lasse Koskela on September 20 2002 01:49 EDT
- multiple home lookups by Craig Knelsen on September 20 2002 13:19 EDT
-
multiple home lookups[ Go to top ]
- Posted by: Lasse Koskela
- Posted on: September 20 2002 01:49 EDT
- in response to Pravesh Bhargava
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. -
multiple home lookups[ Go to top ]
- Posted by: Craig Knelsen
- Posted on: September 20 2002 13:19 EDT
- in response to Lasse Koskela
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.