Issue Type: Bug Bug
Affects Versions: 2.1.2.Final
Assignee: Jozef Hartinger
Created: 14/Mar/14 12:00 PM
Description:

After upgrading from WELD 1.1.8.Final to 2.1.2.Final, I started to experience the following behavior.

I have two producer and two dispose methods producing/disposing instance of the same type. One pair is distinguished by a qualifier, the other pair is unqualified.

In version 1.1.8 this worked fine, the two couples where paired correctly.

In 2.1.2, this code produces an error

WELD-000077: Cannot declare multiple disposal methods for this producer method.

Producer method: org.jboss.weld.bootstrap.ConcurrentBeanDeployer@3c720215
Disposal methods:

  • Disposer method [[BackedAnnotatedMethod] public org.twinstone.jnpng.app.setups.StorageAppSetup.disposeContextJob(@Disposes @JobScoped StorageSessionInternal)],
  • Disposer method [[BackedAnnotatedMethod] public org.twinstone.jnpng.app.setups.StorageAppSetup.disposeContext(@Disposes StorageSessionInternal, LoggedUser, UserSystem)]
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.resolveDisposalMethod(AbstractBeanDeployer.java:193)
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.createProducerMethod(AbstractBeanDeployer.java:216)
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.createProducerMethods(AbstractBeanDeployer.java:202)
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.createObserversProducersDisposers(AbstractBeanDeployer.java:179)

IMO this is because the unqualified disposer method, claims that it can dispose any products of the type, qualified or not. Trying to resolve disposing method of @Qualified Something is thus ambiguous.

Is this intentional change in behavior? Is it possible to somehow specify that the unqualified disposal method should be used only for unqualified products of Something?

Project: Weld
Priority: Major Major
Reporter: Michal Ševčenko
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