openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harald Wellmann <>
Subject Bean types of EJBs with generic business interface
Date Tue, 13 Nov 2012 15:00:18 GMT
What are the CDI bean types of the following EJB:

public class CalculatorImpl implements Calculator<Integer>

    public Integer add( Integer op1, Integer op2 )
        return op1 + op2;

public interface Calculator<T extends Number>
   T add(T op1, T op2);

Which of the following injection points can be satisfied with this bean:

a) @Inject Calculator<Integer> calculator;
b) @Inject Calculator calculator;

With GlassFish 1.1.8, both a) and b) resolve without problems.

With TomEE 1.5.1-SNAPSHOT/OWB 1.1.6, only b) resolves, and a) causes
the following messages:

15:50:54.776 [main] DEBUG o.a.w.container.InjectionResolver - Adding
resolved beans with key
path='null', qualifiers=@javax.enterprise.inject.Default(),
hashCode=-813701363}] to cache.
15:50:54.781 [main] ERROR unknown.jul.logger - CDI Beans module
deployment failed
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[org.ops4j.pax.exam.regression.javaee.ejb.Calculator] is not found
with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into Field Injection Point, field name :  calculator,
Bean Owner : [CalculatorClient, Name:null, WebBeans Type:MANAGED, API

I'm not quite sure what the expected behaviour according to the CDI
spec should be. And assuming for the moment that GlassFish is correct,
I don't really know if this is an issue in OWB or TomEE or maybe

Any explanations most welcome...

Best regards,

View raw message