I use shiro in a JEE6 environment, configuring it thanks to a simple .ini resource in classpath. With Ini Shiro creates all objects graph by itself (reflectively, using class names and empty constructors).
Unless I missed something, using this way of proceeding it is not possible to inject existing external objects into Ini variables. For example, injecting a JEE managed object would be desirable. Studying code, it might be sufficient to use new ReflectionBuilder( defaults) this constructor is called from IniSecurityManagerFactory.buildInstances() and defaults is got by calling createDefaults() which could be overriden in IniSecurityManagerFactory, but I didn't manage to make it work. Did I miss something ? Is there any easy way to achieve this injection ? It would be nice to accept an initial objects map in Ini configuration API. Or should I forget completely about Ini configuration limitations and use something different like Spring or CDI ? Thank you for your advices. Regards, M. Maison
