Should services include logged in user as a parameter?

Posted by Asaf Mesika on Stack Overflow See other posts from Stack Overflow or by Asaf Mesika
Published on 2010-06-06T16:03:01Z Indexed on 2010/06/06 16:12 UTC
Read the original article Hit count: 358

Hi,

When using the Service design pattern, do you usually place the logged in user, or user scope, as a parameter to the methods of the service interface, or do you call AutheticationService.getLoggedInUser() in the service implementation.

What advantages/disadvantages do you find for each option?

© Stack Overflow or respective owner

Related posts about java

Related posts about design-patterns