I confirm it does work, though there is not trivial (or correct me) task achieve for plain Java SE.

For plain Java SE you need:
1. create a class which implements CDIProvider
2. Weld weld = new org.jboss.weld.environment.se.Weld() or a custom subclass (i.e. to extends createDeployment method)
3. WeldContainer weldContainer = weld.initialize()

and the tricky part:
4. BeanManagerProxy proxy = (BeanManagerProxy) weldContainer.getBeanManager()
5. create a class which extends CDI<Object> and implements all methods by delegating each call to the proxy.

and finally:
6. CDI.setCDIProvider(...) by instantiating the class defined in 1.

Supported yeah, but not easy or trivial to implements

In the end, maybe this should just be more detailed in the user manual under "18.4. Java SE" section.

Final comment, maybe some naming refactoring would help here a bit ; it is imperative to not confound org.jboss.weld.Weld which implements CDI<Object> and org.jboss.weld.environment.se.Weld which does not.

What do you think ?

Thanks,

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to