Description
Enables the usage of Weld framework as Dependency Injection provider, and much more!
Installation
The current version of griffon-weld-plugin is 0.2
To install just issue the following command
Usage
Weld will automatically autowire all dependencies marked with @javax.inject.Inject. The plugin also allows you to define additional beans, interceptors and alternatives in the standard beans.xml file located in griffon-app/conf/metainf.
Every instance created using the framework's facilities (in other words, those those that trigger a 'NewInstance' event) will also participate in the benefits of Weld managed injections. This means you annotate controller, models, and pretty much any artifact supported by Griffon.
There are two properties added to the application instance
- weld - of type
org.jboss.weld.environment.se.Weld - weldContainer - of type
org.jboss.weld.environment.se.WeldContainer
Addons can inject beans during startup. The Weld addon published an event named "BeforeWeld" that can be used to define a set of beans to be added to the BeanManager. Here's how the DataSource plugin does it to inject the default datasource
History
Version |
Date |
Notes |
|---|---|---|
0.2 |
08-15-11 |
Upgraded to Weld 1.1.2.Final |
0.1 |
03-21-11 |
Initial release |


