A singleton service locator with a resource cache creates a global cache that cannot properly handle the component-level mappings for an overloaded resource name.
带有资源缓存的集合服务定位器创建全局缓存,通过这种方式不能为重载的资源名正确处理组件级映射。
The remaining alternative is to use a service locator, make it a singleton, but remove the reference cache.
剩下的一个选择是使用服务定位器使用集合的方式,但是要去除引用缓存。
We have seen that an overloaded resource name and the typical service locator implementation, a singleton with a resource cache, do not get along.
我们已经看到了重载资源名和典型服务定位器实现,有资源缓存的集合,但他们之间并没有很好的合作。
Wherever there are singleton lookup in the legacy codebase, a small change is made to lookup the same component via the service locator instead.
凡是在遗留代码集中出现单件查找的地方,稍加修改即可换用服务定位器来查找同样的组件。
The first component to move towards the service locator design, and away from its singleton origins, is the one that depends on no other singletons, yet may be depended by other singletons.
迈向服务定位器设计、摆脱单件血统的第一个组件是不依赖于其它单件、但被其它单件依赖的组件。
The constructor of BookWebApp gets the singleton instance of the book service implementation object.
BookWebApp的构造函数获取这个图书服务实现对象的singleton实例。
Your service will be a singleton by default, just like it would be if you were using Spring directly.
默认情况下,服务是一个单体,就像直接使用Spring一样。
Another way is for each component type to use its own instance of service locator, not a singleton.
另外一个方法是每个组件类型使用它自身的服务定位器实例,而不是集合。
The portlet service programming model is singleton-based, which means that there is no portlet entity specific instance of a portlet service.
Portlet服务编程模型是基于单一实例的,这意味着Portlet服务没有特定于Portlet实体的实例。
The portlet service programming model is singleton-based, which means that there is no portlet entity specific instance of a portlet service.
Portlet服务编程模型是基于单一实例的,这意味着Portlet服务没有特定于Portlet实体的实例。
应用推荐