james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: UsersRepository & MailRepository shared context
Date Tue, 05 Jun 2007 09:12:11 GMT
Michael Valenty ha scritto:
> In a POP3 session, MyUsersRepository is checking credentials w/ another
> system that hands back a transient "session token" that is required for all
> subsequent calls. So, in MyMailRepository.list() when I get messages, I need
> to supply the session token I generated in MyUsersRepository.
> I am accomplishing this now by using a singleton object and caching the
> session token with the username as the key. I get the username from the
> MyMailRepository.configure(). It works, but it seems like a hack. from
> MyMailRepository, I would like to do something like:
> MyUser user = (MyUser)getContext().getCurrentUser();
> String sessionToken = user.getSessionToken();
> Is this possible? Is there a better way than my singleton hack?

I think this is currently the only way.


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message