问题:
设置了<max-beans-in-cache>,但是passivate总是不出现
解决办法:
跟<cache-type>的设置有关:
The cache-type element specifies the order in which EJBs are removed from the cache. The values are:
- Least recently used (LRU)
- Not recently used (NRU)
-
The minimum cache size for NRU is 8. If max-beans-in-cache is less than 3, WebLogic Server uses a value of 8 for cache-type.
-
如果用LRU,就不会出现这种情况,只要创建实例大于<max-beans-in-cache>,就会passivate
详细见:http://e-docs.bea.com/wls/docs70/ejb/reference.html#1165192