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.
如果你的团队正设法将现存应用从单件嵌套设计转为依赖注入(DI),但事实证明很困难的话,你会对这篇文章倍感亲切。
You will have an affinity to this article if your team is trying to move an existing application to Dependency Injection (di) from a nest-of-singletons design, but it is proving difficult.
作为一个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.
应用推荐