That's an even better question ;)

On Tue, Jun 30, 2009 at 3:55 PM, Maarten Bosteels
<[email protected]>wrote:

>
>
> On Tue, Jun 30, 2009 at 7:31 PM, Les Hazlewood <[email protected]>wrote:
>
>> Hi Jonas,
>>
>> You wouldn't necessarily use Shiro to do this - although you could - but
>> it would be Shiro implementation-specific and I wouldn't recommend it when
>> you're already using Spring, which provides nice lookup capabilities
>> already.
>>
>> If it is spring based, the easiest thing to do is just to acquire the
>> realm from the Spring application context:
>>
>>
>> WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).getBean("myRealm");
>>
>
> Why looking it up when you can just as well inject it ?
>
> Maarten
>

Reply via email to