shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Herman <dst...@purpleasphalt.com>
Subject Re: Shiro, hibernate and envers
Date Wed, 25 May 2011 18:19:32 GMT
I had wrongly assumed that it was in a new thread but when I pulled out the
thread.getName() they were both "main"

On Wed, May 25, 2011 at 2:16 PM, David Herman <dstarh@purpleasphalt.com>wrote:

> Ok I've figured out this issue.  It's not a separate thread in this case,
> it just happens that there are multiple phases to the app.  When the app is
> starting up it goes through a bootstrap process that was calling the same
> code to insert base data as will be hit when an end user is using the web
> app.  Since we're using the ShiroFilterFactoryBean to attach the security
> manager to the thread it was not being bound when the bootstrap was
> happening.  I've created a new thread regarding that.
>
>
> On Wed, May 25, 2011 at 2:11 PM, Les Hazlewood <lhazlewood@apache.org>wrote:
>
>> Is a Java Executor or ExecutorService used to dispatch its event to
>> the listeners?  What 'kicks off' the Hibernate event listener thread?
>>
>> Also, when the event is triggered, is there identifying information
>> associated with the event, such that you could inspect it and
>> re-create the subject based on that identity data at that time?
>>
>> Finally, what do you mean by 'normal mode' vs. 'runAs' mode?  When is
>> one used vs the other?  Are you using 'runAs' in the event listener?
>>
>> I'm happy to help - it's just a bit difficult to understand the 'flow'
>> of how this works at runtime...
>>
>> Cheers,
>>
>> Les
>>
>> On Wed, May 25, 2011 at 7:10 AM, David Herman <dstarh@purpleasphalt.com>
>> wrote:
>> > I've got shiro implemented and it's working quite well.  We're now
>> trying to
>> > implement envers to do audit logging of our entities in hibernate and
>> that
>> > works as well.  One problem is we're trying to get the subject making
>> the
>> > change from shiro both in normal mode and in runAs mode.  The problem is
>> > that envers runs as a hibernate event listener which seems to be in a
>> > separate thread.  Anyone have any suggestions on how I can bind shiro
>> > properly to the thread in the newly created hibernate event?
>> >
>> > --
>
>
>
>
>


-- 
Regards,
David
www.purpleasphalt.com
954|288|6864
@dstarh <http://www.twitter.com/dstarh>
about.me/dstarh

Mime
View raw message