Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context when accessing EJBs from other EJBs

 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Suppose a J2EE server deploys 2 EJBs, the first one is accessed remotely by a client, and the second one is accessed locally by the first one. Will the security credentials used to access the first EJB be automatically transferred to the second one?

Thank you,
Yuriy
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yuriy,


Suppose a J2EE server deploys 2 EJBs, the first one is accessed remotely by a client, and the second one is accessed locally by the first one. Will the security credentials used to access the first EJB be automatically transferred to the second one?

Yes they will. Actually the security credentials are specific for each execution thread. The container usually intercepts the client request and extracts the principal for that thread. The authentication/authorization process will basically be the same for each protected resource.
Regards.
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great, thanks!

Yuriy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic