Topic
  • 1 reply
  • Latest Post - ‏2013-03-21T13:56:48Z by SystemAdmin
SystemAdmin
SystemAdmin
37422 Posts

Pinned topic produces and qualifier in weblistener UnsatisfiedResolutionException

‏2013-03-19T06:16:20Z |
I have a weblistener, and a @Produces method is in this weblistener.
like this
@WebListener
public class MyListener implements ServletContextListener {
...
...
...
@Produces
@OneQualifier
public File getFile() {
....
}
}

and this qualifier Object is injected in the other Bean;
like this
@Inject
@OneQualifier
private File someFile;

But when Websphere starts up, I get a error
javax.enterprise.inject.UnsatisfiedResolutionException: Api type http://java.io.File is not found with the qualifiers

and it is OK in GlassFish and Tomee.

Thanks for any ideas
Updated on 2013-03-21T13:56:48Z at 2013-03-21T13:56:48Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: produces and qualifier in weblistener UnsatisfiedResolutionException

    ‏2013-03-21T13:56:48Z  
    That means I can not inject a bean which is produced by ServletContextListener?
    I am using Websphere 8.5, but when I use GlassFish or Tomee, it works well.