[weld-issues] [JBoss JIRA] Updated: (WELD-247) Adaption of InjectionTarget does not take effect on a ProcessInjectionTarget event for an Extension in a jar of WEB-INF/lib

Paul Sandoz (JIRA) jira-events at lists.jboss.org
Tue Nov 3 03:39:05 EST 2009


     [ https://jira.jboss.org/jira/browse/WELD-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Sandoz updated WELD-247:
-----------------------------

    Attachment: jcditest.zip


I have attached a simple maven-based web project that produces a war which should be deployable on JBoss or GlassFish. Deploy the war and goto the URL:

  http://localhost:8080/webapp/test

then look in the logs. One should see output like:

  JAR: INJECT:
  JAR: POST CONSTRUCT:
  JAR: PRE DESTROY:

If adaption of InjectonTarget was successful, otherwise no such output will occur.

Because of another issue it is not possible to get a reference to the Extension in the war (try the URL (http://localhost:8080/webapp/exception) thus it is hard to place assertions without resorting to static fields (which i want to avoid in case that is unreliable).

If one includes an extension in the war (modify the META-INF/services/javax.enterprise.inject.spi.Extension file to uncomment the declaration). Then multiple events start getting registered (see output in the log) sometimes two events get reported to the Extension in the war and one event to the jar, sometimes the other way around. And sometimes InjectionAdaption then works. I have not been able to ascertain what the exact pattern of behavior is in this respect.

> Adaption of InjectionTarget does not take effect on a ProcessInjectionTarget event for an Extension in a jar of WEB-INF/lib
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WELD-247
>                 URL: https://jira.jboss.org/jira/browse/WELD-247
>             Project: Weld
>          Issue Type: Bug
>          Components: Events, GlassFish Integration, Infrastructure
>         Environment: Weld 1.0.0 (SNAPSHOT), GlassFish
>            Reporter: Paul Sandoz
>            Priority: Blocker
>         Attachments: jcditest.zip
>
>
> If an Extention is defined in a jar located in WEB-INF/lib then that jar will receive ProcessInjectionTarget events but modification of the InjectionTarget, for example adapting the InjectionTarget does not have any effect. The methods on the adapted InjectionTarget instance are never invoked.
> I am using a build of Weld from the trunk that Roger Kitain gave me to test.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list