Bernard Tison created DELTASPIKE-294:
----------------------------------------
Summary: Weld: Ambiguous dependency with global alternatives when
multiple @Alternative classes
Key: DELTASPIKE-294
URL: https://issues.apache.org/jira/browse/DELTASPIKE-294
Project: DeltaSpike
Issue Type: Bug
Components: Core, JPA-Module
Affects Versions: 0.3-incubating
Environment: Weld / JBoss AS 7.1
Reporter: Bernard Tison
Issue was observed when doing the following:
BeanManagedUserTransactionStrategy configured as a global alternative by
including a apache-deltaspike.properties file in the META-INF directory of the
deployment archive.
The apache-deltaspike.properties file contains the following entry:
org.apache.deltaspike.jpa.spi.transaction.TransactionStrategy=org.apache.deltaspike.jpa.impl.transaction.BeanManagedUserTransactionStrategy
When the archive is deployed on JBoss AS 7, it gives the following error
message:
WELD-001318 Cannot resolve an ambiguous dependency between [Managed Bean
[class
org.apache.deltaspike.jpa.impl.transaction.EnvironmentAwareTransactionStrategy]
with qualifiers [@Any @Default], Managed Bean [class
org.apache.deltaspike.jpa.impl.transaction.BeanManagedUserTransactionStrategy]
with qualifiers [@Any @Default]]
So it seems that both EnvironmentAwareTransactionStrategy and
BeanManagedUserTransactionStrategy are promoted as a global alternative for
TransactionStrategy.
--
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