[Yanel-dev] Login Issue?

Michael Wechner michael.wechner at wyona.com
Tue Jan 25 10:31:13 CET 2011


On 1/24/11 10:25 AM, Cedric Staub wrote:
> On Mon, Jan 24, 2011 at 11:09:24AM +0100, Cedric Staub wrote:
>> Hmm... This may be implementation-specific. Which class are you using as
>> IdentityManager? But anyhow this is clearly a bug if you ask me. I shall
>> investigate the matter when I have some more time.
> Ok, here's what I have now: If you retrieve a new Environment object
> using the getEnvironment() function from YanelServlet, the current
> identity is retrieved and passed to the Environment in the constructor.
>
> The Environment object then always returns that identity. It does not
> check if the identity changed later on. You'll have to retrieve a new
> environment object for that to work.
>
> That is how I understand the code. You can take a look at the files
>
> src/core/java/org/wyona/yanel/core/Environment.java
> src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java line 930
>
> to see how it works. However, the Environment doesn't have the info to
> update the Identity by itself. I guess it's better to retrieve the
> current identity through the identity manager anyways.
>
> In my opinion we could just deprecate Environment.getIdentity() and tell
> people to use the IdentityManager. What to others think?

I don't think it's that simple. IIRC the reason for this is performance, 
and one can
consider Environment.getIdentity() as the cached version.

I think we rather need to discuss how we can best update this "cache".

Cheers

Michael


> Cheers,
> Cedric



More information about the Yanel-development mailing list