• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPA: get entity for current user

 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

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 Servlet), 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic