tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Osipov, Michael" <michael.osi...@siemens.com>
Subject RE: Availability of a resource in a realm
Date Wed, 18 Apr 2012 07:28:38 GMT
Konstantin Kolinko wrote:
> 2012/4/17 Osipov, Michael <michael.osipov@siemens.com>:
>> Hi folks,
>> 
>> I have a resource declared in my context.xml (not a resource link).
>> I want to retrieve that resource as soon as possible in my realm. I
>> tried start() and init() but it seems like that at this time the
>> InitialContext is not available. So at what time can I expect the
>> context being "complete"?    
>> 
>> I am on Tomcat 6.0.35
>> 
> 
> Look at DataSourceRealm for an example.
> 
> IIRC, what is seen as InitialContext depends on the value of
> Thread.getContextClassLoader() when InitialContext instance is
> created.

I have found the spot. Thanks!
You have the same approach as me. Prior authentication you retrieve the resource. But, I do
cache the resource object you don't. Are there any implications? How costly is a recurring
lookup?

With best regards,
Michael Osipov

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


Mime
View raw message