Despite the code from Melvyn (thanks man!) and tip from atomicknight
(cheers!) in this thread:
http://shiro-user.582556.n2.nabble.com/Realm-can-not-be-managed-by-CDI-td7502061.html

I still can't manage to make it work :-/

I assume this is caused by my CDI implementation framework (OpenWebbeans)
and the way I am bootstrapping the IoC container.

What happens is that in my customized EnvironmentLoaderListener the injected
Realm is null. I attempted to inject some of my beans and debugging showed
that injection is not working at all.

I know this is only indirectly related to shiro, but still could be useful
for anyone who will attempt to enable OWB CDI in shiro.

So my question is this - based on web.xml, is the issue that OWB is also
bootstrapping through ServletContextListerner? Or are there some other
obvious errors that would cause IoC not to work in my customized
EnvironmentLoaderListener?

web.xml
-----------------------------
        <listener>
        
<listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
        </listener>
        <listener>
        
<listener-class>myco.web.filter.CdiWebEnvironmentLoaderListener</listener-class>
        </listener>
        <listener>
        
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
        </listener>

        
        <filter>
                <filter-name>ShiroFilter</filter-name>
                
<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
        </filter>

        <filter-mapping>
                <filter-name>ShiroFilter</filter-name>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>

        <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                
<servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.xhtml</url-pattern>
        </servlet-mapping>
--------------------------------------

Thank you for your help
Reinis



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/Shiro-in-CDI-JPA2-JSF2-project-tp7577437p7577848.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to