Register / Login
EJB and other Java EE Technologies
JPA: get entity for current user
posted 10 years ago
given a typical web application,
secured with JAAS, using a realm that maps to a table "User" in a database, and having an entity (JPA) User, which maps to the same table "User" which JAAS uses to authenticate and authorise -
what is the best way to retrieve an instance of User (e. g. in a
), corresponding to the one who is currently logged in?
It is a good idea to use the same table for JAAS and inside the application, isn't it?
Kai Witte's business website
Kai Witte's private homepage
Boost this thread!
Rudimentary question about JAAS authenticated entity
CMP - Table mapping
What is the authenticated entity in a web app?
JPA - Query isolation
Naive question on "MappedBy" attribute of @OneToMany