Why two different serviceLocators in petstore demo 1.3 ?? 2003-10-05 - By peng wang
Back 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.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|