In Java EE 6, CDI is the default dependency mechanism, which is not currently integrated with Shiro's lightweight DI using INI files.
myRealm = com.example.MyRealm
securityManager.realms = $myRealm
In the MyRealm class, it would be natural to @Inject a UserDAO, but this does not work, since the myRealm instance is directly created by Shiro and not managed by the CDI BeanManager.
Find a way to use CDI managed beans in INI files.