문제

When a user saves or modifies an object, I want to persist their http session username in the database columns CREATE_USER and MODIFY_USER. I'm finding two difficulties with this:

1) Our presentation layer and DAO layer are in separate WARs, so how to share the username ( besides directly passing with each call to the DAO layer) is not clear.

2) How to pass the username from the DAO layer (we're using Hibernate) to the database efficiently isn't clear either. I've considered a Hibernate interceptor, but I'm not sure how to pass the entity manager to it.

How do I solve these problems?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top