Hi all,
First of all thank you for this framework!
I'm looking for a way to use the Shiro Guice integration. I'm looking to
the documentation and I see this:

class MyShiroModule extends ShiroModule


then:

Injector injector = Guice.createInjector(new MyShiroModule());
    SecurityManager securityManager =
injector.getInstance(SecurityManager.class);
    SecurityUtils.setSecurityManager(securityManager);

When I look at the

SecurityUtils.setSecurityManager(securityManager);

It look like this:
    ...
    private static SecurityManager securityManager;
    ...
    public static void setSecurityManager(SecurityManager securityManager) {
        SecurityUtils.securityManager = securityManager;
    }

Could we have a thread-safety issue here?
The SecurityManager attribute is not protected by volatile or lock.

If I look at the different implementation I don' t see final usage and
volatile.

How can I configure MyShiroModule to be sure that I will not encounter
multi-threading issue?

Thanks,

Romain.

Reply via email to