Question

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?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top