"emuckenhuber" wrote :
| which would makes sense, as we don't use the resolvedClassInjections anymore (see
processClass) and encInjections is actually already populated by the InjectionHandlers.
|
| But e.g. the UserTransaction is handled differently in WebResourceHandler:
|
|
| | public class WebResourceHandler implements InjectionHandler
| | {
| | // ...
| | loadXmlResourceEnvRefs(InjectionContainer container, Collection refs)
| | {
| |
| | else if (resType.equals(UserTransaction.class))
| | {
| |
| | if(envRef.getInjectionTargets() != null)
| | {
| | createInjectors(container.getInjectors(), getClassloader(), factory,
getInjectionTargets());
| | continue;
| | }
| | // ....
| | }
| |
The encInjectors is setup as a side-effect of running the handlers in processMetadata:
| public void processMetadata()
| {
| // XML must be done first so that any annotation overrides are initialized
|
| // todo injection handlers should be pluggable from XML
| handlers = new ArrayList<InjectionHandler<Environment>>();
| handlers.add(new WebEJBInjectionHandler<Environment>());
| handlers.add(new DependsHandler<Environment>());
| handlers.add(new PersistenceContextHandler<Environment>());
| handlers.add(new PersistenceUnitHandler<Environment>());
| handlers.add(new WebResourceHandler<Environment>());
| handlers.add(new WebServiceRefHandler<Environment>());
|
If we don't need that anymore, this is where they could be setup.
"emuckenhuber" wrote :
| Assuming that the processAnnotations should be like that, we would need to add those
injectors also to the EncInjections and so smth like:
|
|
| | createInjectors(container.getEncInjections(), getClassloader(), factory,
getInjectionTargets());
| |
|
| I think adding it to a List would not make sense in this case (same for the
WebServiceHandler).
|
| That should be it, so that we just process annotations once (still ignoring dynamic
beans). Does that makes sense ? :)
|
|
If it works, yes ;).
Cleanup the TomcatInjectionContainer as much as possible, minimizing reliance on the old
ejb3 injection code as we will eventually move this to the mc based injection component
factory project:
https://svn.jboss.org/repos/jbossas/projects/component-factory/trunk/
Right now were just focused on getting the tck passing.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169121#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...