Why two different serviceLocators in petstore demo 1.3 ?? 2003-10-06 - By Kalra, Ashwani
Back hi, IMO, web locator is for remote clients. Creating an initial context(which actually connects to the naming service) is an expansive operation. To restrict this , the clients are not given control to create the singlaton objects. Regarding the synchronisation, this should not be any problem, as the operations are synchronized till the duration of modifying the cache.
Regds Ashwani
>-- --Original Message-- -- >From: peng wang [mailto:wp0@(protected)] >Sent: Sunday, October 05, 2003 8:09 PM >To: J2EEPATTERNS-INTEREST@(protected) >Subject: Why two different serviceLocators in petstore demo 1.3 ?? > > >Hi, > >In petstore, I find there are two kinds of service >locators, one is for the web tier, the other for the >ejb tier. > >In web tier a componentManager gets locator instance >by invoking static method: > static public ServiceLocator getInstance() { > return me; > } >Since there is only one instance, does it then form a >bottle neck in web tier? > >In ejb tier, an ejbAction get locator by creating a >new >instance like: > ServiceLocator sl = new ServiceLocator(); >So I think there are multi serviceLocator instances in > >the ejb tier(differing from web tier). > >What is the force for two kinds of serviceLocators in >petstore application? When need to use the first, and >when the second?? > >Thanks! > >__ ____ ____ ____ ____ ____ ______ >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search >http://shopping.yahoo.com > >==================================================================== >Companion Site: http://www.corej2eepatterns.com >J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns >List Archive: >http://archives.java.sun.com/archives/j2eepatterns-interest.htm l Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|