清单2给出对象管理器的API。
对象管理器根本不管理它们。
另外,对象管理器还理解范围的概念。
In addition, an object manager understands the concept of scope.
不同的对象管理器可能管理属于同一范围的对象。
Different object managers may manage objects belonging to the same scope.
对象管理器把范围信息与获取的每个对象关联起来。
The object manager associates the scope information to each object being retrieved.
在这个请求范围结束之后,它们各自的对象管理器必须释放它们。
After the request scope has ended, their individual object managers must release them.
使用它通知对象管理器请求范围即将结束,应该释放对应的对象。
Use it to notify the object manager that a request scope is about to end and to release the corresponding objects.
为了使用前一节中定义的对象管理器和标识范围,需要使用范围键。
To use the object manager defined in the last section and to identify scopes, you'll need to use scope keys.
使用它通知对象管理器应用程序范围已经结束,应该释放对应的对象。
Use it to notify object managers that an application scope has ended and to release the corresponding objects.
让对象管理器理解范围的概念,就可以解决本文开头提到的一个问题。
Having the object manager understand scopes addresses one of the issues raised at the beginning of this article.
在这种分布式计算环境中(见图2),每个JVM至少有一个对象管理器。
In this distributed computing environment, illustrated in Figure 2, each JVM has at least one object manager.
与对象池一样,对象管理器也负责从池中获取对象和把对象返回池中。
Much like an object pool, an object manager is responsible for getting objects from a pool and returning objects back to the pool.
使用它通知对象管理器会话范围已经结束(或即将结束),应该释放对应的对象。
Use it to notify object managers that a session scope has ended (or is about to end) and to release the corresponding objects.
如果必须将一个事件同时通知多个对象管理器,那么使用发布-订阅模型是最合适的。
When you have to notify multiple object managers of an event at the same time, a publish-subscribe paradigm is best suited for your communication needs.
示例代码演示如何用对象管理器在一个Struts 1.1应用程序中管理请求范围。
The sample code demonstrates how to use the object manager to manage a request scope in a Struts 1.1 application.
这个范围不需要事件,因为与它相关联的对象由垃圾收集器释放,而不是由对象管理器负责。
No event is necessary for this scope because objects associated with it are released by the garbage collector rather than object managers.
在清单5中,AnyAction代表任何Struts动作;它演示如何从对象管理器获取对象。
In Listing 5, AnyAction represents any Struts action; it shows how you can get an object from the object manager.
在开发CIST的过程中,本人承担并完成了对象管理器的设计与实现,以及随机数生成器的设计与实现。
In the process of designing CIST, I designed and implemented the object manager and the random number generator.
拥有对象管理器并使用简单的对象表示之后,您就获得一种在Web应用程序中处理对象的简单但强大的方法。
With a simple representation of the object and a manager for that object, you have a powerful yet simple way to handle objects in your Web application.
在本文中,我将用对象管理器(object manager)这个词表示这个框架,以便区别于传统的对象池。
I'll use the term object manager in this article to distinguish the framework from a conventional object pool.
若要创建已注册类型的多个实例,请使用工厂模式创建一个对象管理器,该对象管理器将向应用程序注册并管理多个实例。
To create multiple instances of a registered type, use the factory pattern to create an object manager that is registered with the application and then manages the multiple instances.
若要创建已注册类型的多个实例,请使用工厂模式创建一个对象管理器,该对象管理器将向应用程序注册并管理多个实例。
To create multiple instances of a registered type, use the factory pattern to create an object manager that is registered with the application and then manages the multiple instances.
应用推荐