[ 
https://issues.apache.org/jira/browse/WICKET-3969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122414#comment-13122414
 ] 

Jeff Campbell commented on WICKET-3969:
---------------------------------------

I've been playing with wicket-cdi, here are some notes:
- Example deploys/runs WELL to Jetty
- When deploying the example war file to Tomcat 7, deployment fails on the 
following Line of org.jboss.weld.environment.servlet.Listener (197)

jspApplicationContext.addELResolver(manager.getELResolver());

(BeanManager IS resolved (from getServletContext().getAttribute(...)), but "new 
CdiConfiguration(manager).configure(this);"  fails.

- The Example deploys/runs WELL to run in GlassFish 3.1 and JBoss AS7 by doing 
the following
    - web.xml: REMOVE:

    <listener>
                
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
     </listener>
    
     - CdiApplication.java: REPLACE:

                BeanManager manager = 
(BeanManager)getServletContext().getAttribute(Listener.BEAN_MANAGER_ATTRIBUTE_NAME);

                WITH:

        BeanManager manager = null;
        try {
            manager = (BeanManager) new 
InitialContext().lookup("java:comp/BeanManager");
        } catch (NamingException e) {
            e.printStackTrace();
        }

- Current Issue: No Support for @Inject in an AuthenticatedWebSession when your 
application extends AuthenticatedWebApplication and overriding 
getWebSessionClass().

I have not been able to figure this one out... yet.  When I use Spring, it 
would work when I would put the following line in the constructor:

Injector.get().inject(this);

This would allow me to use @SpringBean in my AuthenticatedWebSession object.  
This does not work with wicket-cdi (I put @Inject in my AuthenticatedWebSession 
and also have Injector.get().inject(this) in the constructor).
                
> Add CDI integration
> -------------------
>
>                 Key: WICKET-3969
>                 URL: https://issues.apache.org/jira/browse/WICKET-3969
>             Project: Wicket
>          Issue Type: New Feature
>            Reporter: Igor Vaynberg
>            Assignee: Igor Vaynberg
>             Fix For: 1.6.0
>
>
> Introduce integration with CDI containers which should include
> * injection of components with CDI dependencies
> * conversation scope propagation across pages

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to