Question :What design pattern would you use to reduce JNDI lookups? (EJB)
Answer :Use ServiceLocator/EJBHomeFactory Pattern to reduce expensive JNDI
lookup process.
How it works is to cache those service objects when the client performs
JNDI lookup first
time and reuse that service object from the cache second time onwards for
other clients.
This technique maintains a cache of service objects and looks up the JNDI
only first time
for a service object. This technique reduces redundant and expensive JNDI
lookup process
thus increasing performance significantly.
Service Locator Pattern implements this technique by having a class to
cache service objects,
methods for JNDI lookup and methods for getting service objects from the
cache.
ServiceLocator acts as interceptor between client and JNDI.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Friday, March 13, 2009
What design pattern would you use to reduce JNDI lookups (EJB)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment