我们正在做的一件事是支持集群的单例服务。
One of the things we are working on is support for clustered singleton services.
我们的目标是让用户能通过注解(annotation)和定制的SCA范围来指定集群的单例服务。
Our goal is to allow users to specify a clustered singleton using an annotation and custom SCA scope.
作为一个EJB,该单例可以访问标准的EJB中间件服务集——事务管理、安全、远程、依赖注入等等。
As an EJB, the Singleton has access to the standard set of EJB middleware services - transaction management, security, remoteing, dependency injection and so on.
更有甚者,单例对象能够被状态化;这样,它们可以作为一个状态仓库向外提供服务。
Moreover, singletons can be stateful; in this case, their role is to serve as a unique repository of state.
通常,我们更喜欢使用portlet服务,而不喜欢用惯用的对象,例如单例对象,这是因为。
Generally, we prefer using portlet services over more traditional objects, such as singletons, because.
清单10中的gameservice类是一个单例类,代表给定游戏的游戏服务器和当前状态。
The GameService class, in Listing 10, is a singleton class that represents the game server and the current state of the given game.
单例模式-每个依赖服务的组件,都是获得服务工厂生成单个实例的引用。服务是一个单例对象或函数,对外提供特定的功能。
Singletons - Each component dependent on a service gets a reference to the single instance generated by the service factory.
单例模式-每个依赖服务的组件,都是获得服务工厂生成单个实例的引用。服务是一个单例对象或函数,对外提供特定的功能。
Singletons - Each component dependent on a service gets a reference to the single instance generated by the service factory.
应用推荐