[Yanel-dev] Login Issue?

Cedric Staub cedric.staub at wyona.com
Mon Jan 24 11:25:51 CET 2011


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?

Cheers,
Cedric


More information about the Yanel-development mailing list