Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 JSF 应用程序中,@PostConstruct 在 initApplication() 方法中提到,@PreDestroy 用于关闭所有数据库连接
我让超过 2 个用户同时登录。当任何一个注销的会话被@PreDestroy 无效时。所以其他用户也无法连接。
I want to call @PreDestroy only when my Application scope terminated, not for session invalidation.
我该怎么做?