Everybody says to cache EJBHome references, to avoid JNDI lookup overhead. But what about the Remote Interface?
Why not to Cache it too? Someone can give me an explaination?
Deeply: is there any difference with the different kinds of EJBs? (I'm using just one Stateless...)
Thank's and bye
Ivan
-
Ejb Reference Cache: the Remote Interface too? (2 messages)
- Posted by: ivan di maro
- Posted on: March 03 2005 12:05 EST
Threaded Messages (2)
- Ejb Reference Cache: the Remote Interface too? by Amit Kumar on March 03 2005 17:02 EST
- link to an interesting thread by ivan di maro on March 11 2005 09:22 EST
-
Ejb Reference Cache: the Remote Interface too?[ Go to top ]
- Posted by: Amit Kumar
- Posted on: March 03 2005 17:02 EST
- in response to ivan di maro
You should not cache the EJBObject. Because, It's just a reference and it's not necessarily guaranteed to remain "connected" to the EJB container or may have collected by GC.
On other side, EJBHome, which is already bound with JNDI and can't be invalidate and therefore are best candidate for cache.
I don't know but it's depend on your application design and requirement but Handles are more better then EJBHome in terms of caching.
Hope this will help :) -
link to an interesting thread[ Go to top ]
- Posted by: ivan di maro
- Posted on: March 11 2005 09:22 EST
- in response to Amit Kumar
Hello Amit,
I Thank you for your answer. In the time I had found a very interesting thread here
http://www.jguru.com/faq/view.jsp?EID=734699
Take a look if you want.
With that information I cached the EJBHome too (in particular the EJB Handle). I hope it will work fine...