通常,我们更喜欢使用portlet服务,而不喜欢用惯用的对象,例如单例对象,这是因为。
Generally, we prefer using portlet services over more traditional objects, such as singletons, because.
5 - 6章还探究了一些常见问题例如静态单例反模式以及使用依赖注入的解决方案,并调查了web应用和其它应用的范围。
They also explore problems with common idioms such as the static singleton anti-pattern and solutions using dependency injection, and examine scopes for web applications and other purposes.
例如,看一下清单1内所示的这个连接池单例。
For example, take a look at the connection pool singleton in Listing 1.
应用推荐