> I think you are right. When no realm is configured in server.xml and in the
> context of a webapp, StandardEngine tries to set a default realm.
> That is guarded by a lock, which is held by the main thread.
> 
> To work around this problem, you can define a simple realm inside the
> context of your webapp or globally in server.xml.
> 
> To fix the problem we will have to look at the locking for setRealm in
> ContainerBase.
> 
> Regards
>   Felix

I can confirm that reverting CLN 1190190
http://svn.apache.org/viewvc?view=revision&revision=1190190
fixes this.

Alternatively, removing the synchronized block from setRealm() also 'fixes' 
this.
It looks like we can add some locks around Realm, but it doesn't look like 
ContainerBase is even close to being actually threadsafe.
I'm not sure what the existing standards for Tomcat code are in this area.

-Michael 

Reply via email to