tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: [PROPOSAL] Remove Realm from GenericPrincipal
Date Mon, 03 Aug 2009 09:14:04 GMT
Konstantin Kolinko wrote:
> 2009/7/17 Mark Thomas <markt@apache.org>:
>> As a result of looking into
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=40881, I discovered
>> that the only use made of the Realm attribute of GenericPrincipal is to
>> control whether or not a debug message is logged in RealmBase.hasRole()
>>
>> Given that the Realm is the reason that GenericPrincipal is not
>> Serializable, I'd like to propose the following changes for Tomcat 7.
>>
>> 1. Remove the Realm from GenericPrincipal
>> 2. Make GenericPrincipal Serializable
>> 3. Take advantage of this to simplify the Cluster code
>>
>> As a by product, this should also address bug 40881 by allowing any
>> Realm that uses any Serializable Principal to work with clustering.
>>
>> Thoughts?
>>
>> Mark
>>
> 
> One more note to this:
> since rev.791900 GenericPrincipal stores a reference to LoginContext,
> and LoginContext is not serializable.

Yeah, when I got around to progressing this, I was going to make it
transient.

> At least it means that that field will be transient, and probably
> that issue 39231 that that commit (with some followups) fixes
> won't/cannot be fixed for clusters. (I suppose so, though I may be
> wrong).

I think you're right although, assuming sticky sessions are being used,
this is a very narrow edge case I think we can live with. I'll add a
note to the bugzilla issue.

Mark

> http://svn.apache.org/viewvc?view=rev&revision=791900
> https://issues.apache.org/bugzilla/show_bug.cgi?id=39231
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 




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


Mime
View raw message