hi. would it be a good idea for an application to save (in memory) home references for reuse (through a singleton prehaps) so that JNDI lookups are done only once per bean?
- Posted by: Trevor S
- Posted on: April 05 2001 12:23 EDT
for example, i noticed that i a sample app i wrote that the time it too to do a ctx.lookuo was greater than calling home.create. if i have a servlet with a who accesses all its Resources through a singleton, would it not be a good idea to do home lookups once, and just reuse it after that?
or am i way off base here?
- Saving JNDI lookups by caching home references by Reema Patel on April 05 2001 12:37 EDT
- Saving JNDI lookups by caching home references by Arjun Bhattacharya on April 05 2001 19:08 EDT
- Saving JNDI lookups by caching home references by Goprinks R on April 05 2001 22:14 EDT
- Saving JNDI lookups by caching home references by somal sood on April 06 2001 01:57 EDT
- Saving JNDI lookups by caching home references by Trevor S on April 06 2001 09:17 EDT
- Saving JNDI lookups by caching home references by Trevor S on April 06 2001 09:19 EDT
- Saving JNDI lookups by caching home references by Arjun Bhattacharya on April 07 2001 12:21 EDT
- Saving JNDI lookups by caching home references by Sanjay Jairam on July 09 2001 11:12 EDT
- Saving JNDI lookups by caching home references by Omer Sarica on April 11 2001 11:40 EDT
- Saving JNDI lookups by caching home references by Anthony Tang on May 02 2001 08:02 EDT
- Saving JNDI lookups by caching home references by Yermal Sunil on July 04 2001 02:50 EDT
- Saving JNDI lookups by caching home references by Daniel Hajduch on October 12 2003 07:07 EDT
- Arjun from BEC??? by Anand Singh on March 23 2005 16:14 EST
Seems like an interesting thing to do for developer :)...but news is providers already do that for us. I have known most of the directory services caching the queries/lookups. So yes, you may find ctx.lookup taking some time in the first call, but subsequent lookups on the same object should be faster.
Hope this helps,
caching home refernces at the client is a great idea.
but i think its different from cachin in the home reference by app servers at JNDI layer.
cachin the reference at the client level will save on an extra network call (client n server - different VM/box).
Its certainly a good idea and I use it extensively. I even have general EJBHome cacher. If you are interested let me know. (Ofcourse it comes free, please give ur email)
Even in my project i have written a different class where i am doing all the lookup of the beans so that all the other beans which needs to do lookup do not spend time on doing the same job.
Well u cld send me yr code..My email id is ..
rinku_razdan at yahoo dot com
Thanks in advance
Hi Arjun ,
Even I am using ejb extensively in my project , I would really appreciate If you can send me your ejb cacher my email id is basant_bineet at yahoo dot com
Thanxs in advance
Can you send me the EJB Home casher code.
My e-mail: harikrishna dot maharshi at DaimlerChrysler dot com
could you please send me code you mentioned
That wouldn't be too difficult to implement i think. if homeref != null, lookup....probably a number of ways...perhaps make it a singleton, and there would be one for EJB's themselves to use, and then one in the client env.
or do you implement it as an ejb itself?
oops, i meant if the lookup key has a null value, then lookup.
Yup pretty simple (who doesn't luv simple things in life:))... yet should be able to support distributed EJBs and I'm still thinking up other stuff which it should be able to do.
And umm... I think it should be a seperate utility class which can be used by any client not in the EJB itself. Makes a little more generic and save lot of recoding.:))
Anyways I'm sending out the code to those who requested it.
Oh I forgot.. should support EJBs on any AppServer; failover..etc etc.
Can u send me ur code ..I am mainly interested in the failover part ...
kvenkataraman at symphoni dot com
412 414 5385(mobile)
412 446 2219(Work)
1 800 439 7757 (# 2219) (Work)
412 343 6549(Res)
We have a high performance objective to reach. ie about 50 messages a second. We are looking to cache a lot of the JNDI data. Similiar to session/Entity facade.
Firstly please send the code.
Secondly where do you do the caching and in what do you store this information?
thanks in advance
Can you please send me a copy of ur EJBHome chacher?
We are optimizing code for application performance and need to validate our approach.
I hope you are still following this thread. :)
sudha dot gorti at mphasis dot com
I am in the process of designing something similar.
Could you also send me your code?
osarica at up dot com
Hi even I am doing something similar and this will be a great help. My email address is chaturs at hotmail dot com
Sorry for getting back on this so late; but have been on much needed vacation. Failover is onething still semi-done. So will send it out once its done.
I'm also interested in the code. Would you please send a copy to me (anthonyytang at hkex03 dot com dot hk)
well I'm interested in caching EJBHome reference.
cud u please mail EJBHome cacher to me at shilpa at musambi dot com
can you send me the source code about caching home referencec, please. My email is firstname.lastname@example.org
Sorry I know its very old post is it possible to send me the code.
smithavallaru at yahoo dot com
Did you study in BE College Shibpur?
Sorry, abt using this forum to ask you this but I am desperately trying to reach a friend of mine with the same name.
here is a reference for any beginers.