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 CDI sessionscope Bean の開始と破棄を記録したいと考えています。どうすればいいですか?(ユーザー、ログイン時間、ログアウト時間などの詳細をデータベースに記録する必要がありました。)
それが良い考えであるかどうかに関係なく:
@PostConstruct/で注釈が付けられたメソッドは、@PreDestroy構築後または破棄前と呼ばれます。
@PostConstruct
@PreDestroy