但是服务定位器不应包含资源缓存。
But the service locator should not include a resource cache.
我第二个实现使用了缓存服务定位器。
成分根+只需一点小小的服务定位?
要解决由服务定位器导致的问题的难度有多大呢?
How hard will it be to figure out that the service locator is causing the problem?
重载资源名使得服务定位器与其缓存之间变得混乱。
So overloaded resource names mess up a service locator and its cache.
我的第三个实现使用没有缓存的服务定位器。
My third implementation used a service locator with no cache.
包含访问数据源缓存的服务定位器实现如下。
A service locator implementation that includes caching accesses a data source like this.
他们利用市场来给产品和服务定位,以达到他们想要的结果。
They use marketing to position items and services to get the results they want.
由于缓存服务定位器的原因,两个bean现在使用相同数据源。
Because of the caching service locator, the two beans are now using the same data source.
模块化模式:分离界面和插件、服务定位、事件聚合、外观模式。
Modularity patterns: Separated Interface and Plug In, Service Locator, Event Aggregator, facade.
好,既然是由于缓存服务定位器导致重载资源名时的错误。
OK, so a caching service locator causes errors for overloaded resource names.
为产品服务定位定价使它符合市场需要,这通常是个很微妙的平衡;
position and price to align the product/service with its market, often an intricate balance; and
为了安全,你需要用一种机制来锁定服务定位器并使之只读。
To make this safe, you need to have a mechanism to lock the service locator and make it read only.
剩下的一个选择是使用服务定位器使用集合的方式,但是要去除引用缓存。
The remaining alternative is to use a service locator, make it a singleton, but remove the reference cache.
服务定位器实现通常包括资源缓存,以此来避免对相同资源的重复查找。
Service locator implementations usually include a resource cache to avoid repeated lookups of the same resource.
另外一个方法是每个组件类型使用它自身的服务定位器实例,而不是集合。
Another way is for each component type to use its own instance of service locator, not a singleton.
这是因为服务定位器将缓存不论哪个组件首次使用时所重载的名称的资源。
This is because the service locator will cache the resource for whichever component USES the overloaded name first.
我们为Cairngorm提供了一个可配置在IoC容器中的服务定位器。
For Cairngorm, we offer a service locator that can be configured in the IoC container.
业务逻辑代码使用服务定位器避免目录查找代码变得混乱,因此它很容易理解。
Business logic code that USES a service locator avoids becoming cluttered with directory lookup code, and so is easier to understand.
将其应用于现有应用程序很简单:只要改变服务定位器实现去禁止或去除缓存。
This is simple to apply to an existing application: just change the service locator implementation to disable or remove the cache.
因此,在J2EE 1.3应用程序中,服务定位器的实现不应该包含资源缓存。
Therefore, J2EE 1.3 applications should not include the resource cache in their service locator implementations.
通过对用户需求的分析,提出高校图书馆分馆的服务定位,并探索分馆服务模式。
Through the analysis on the information user's demand, this paper puts forward the service positioning of branch libraries, and probes into a new service mode of the branch libraries.
包含缓存服务定位器的应用程序迟早要出问题,而且这个问题将很难检测、很难再现且很难诊断。
Applications that contain a caching service locator are a problem waiting to happen — a problem that will be difficult to detect, difficult to reproduce reliably, and difficult to diagnose.
不要只假设缓存服务定位器能显著的提高应用程序的性能,要使用性能测试来证明这一点。
Do not just assume that a caching service locator significantly improves application performance; use performance testing to confirm that it does.
凡是在遗留代码集中出现单件查找的地方,稍加修改即可换用服务定位器来查找同样的组件。
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 client passes in a unique identifier — a resource name — for the resource; the service locator finds the resource and returns it to the client.
重点研究了负载均衡和服务定位等关键技术,提出了基于网络测量和服务性能测量的MBPP算法。
Key techniques such as load balancing and service locating are then studied in detail. A MBPP algorithm based on the network and service performance measurement is proposed.
带有资源缓存的集合服务定位器创建全局缓存,通过这种方式不能为重载的资源名正确处理组件级映射。
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.
我们已经看到了重载资源名和典型服务定位器实现,有资源缓存的集合,但他们之间并没有很好的合作。
We have seen that an overloaded resource name and the typical service locator implementation, a singleton with a resource cache, do not get along.
我们已经看到了重载资源名和典型服务定位器实现,有资源缓存的集合,但他们之间并没有很好的合作。
We have seen that an overloaded resource name and the typical service locator implementation, a singleton with a resource cache, do not get along.
应用推荐