Instead of forcing callers to assume the burden, you can write factories to manage the creation of an object and its dependencies.
您可以不增加调用方的负担,而是编写一些工厂来管理对象及其依赖项的创建。
These include the usertransaction object, various types of resource factories, EJBs, and so on.
这些包括usertransaction对象、各种类型的资源工厂、EJB等等。
This enables accessor factory implementations to store the accessor factories in object pools to achieve better performance (due to less initialization overhead and less garbage collection).
这就允许访问器工厂实现将访问器工厂存储在对象池中,以实现更好的性能(因为初始化开销更少,垃圾回收工作也更少)。
Then we applied this pattern to the configuration object provided, ra, which is associated with a specific CICS resource adapter to get the connection factories defined for this adapter.
然后,我们将此模式应用于提供的配置对象,ra,它与具体的CICS资源适配器相关联,从而获得为此适配器定义的连接工厂。
Should My Factories Create All Object Instances? Including for New Entities?
我工厂创建的所有对象实例?包括新的实体?
Should My Factories Create All Object Instances? Including for New Entities?
我工厂创建的所有对象实例?包括新的实体?
应用推荐