Status: Resolved (View Workflow)
Affects Version/s: 1.1.0.Final, 1.1.1.Final
Fix Version/s: 2.0.0.Beta8
Component/s: Weld SPI
Similar Issues:Show 10 results
WELD-1378 Use multiple client proxies for Session Beans, once per business interface WELD-746 Observer inheritance should take into consideration EJB semantics WELD-381 Proxied EJBs as Injection point, wrong interface chosen WELD-1133 Session EJB deployment failure WELD-301 ProducerMethod.checkProducerMethod only checked method declarations in direct implemented interface and not super interfaces WELD-1139 Business method interceptor bindings do not include bindings declared as meta-annotations of other interceptor bindings recursively WELD-625 Local no-interface view EJB3.1 proxy requests superclass of EJB from container WELD-1162 Interceptors not invoked when EJB local interface extends a generic interface WELD-1103 EJB using CMT demarcation with an injection point of type UserTransaction is not detected as definition error WELD-359 EJBs without local interfaces throws NPEs
This is based on the scenario described in http://java.net/jira/browse/GLASSFISH-16186
- @Named @Stateless TimeProviderImpl extends SimpleTimeProvider implements LocalTimeProvider.
- SimpleTimeProvider implements TimeProvider (the latter defining some methods, the former implementing them. No annotations.)
- LocalTimeProvider is @Local and also extends TimeProvider and does nothing more.
So the Local Business interface is LocalTimeProvider.
The following injection is performed on a SessionScoped Bean
private LocalTimeProvider timeProvider1;
The Weld bean proxy for the SessionBean Object reference being injected(timeProvider1) tries to get  the BusinessObject when a method is invoked on it. Weld seems to use  the declaring class of the method being invoked to determine the business interface. Though the business interface of the Bean is set to com.dummy.time.LocalTimeProvider, the class that declares the method being invoked ("getThisMonth()") is com.dummy.time.TimeProvider.
Therefore, the Weld implementation calls SessionObjectReferenceImpl.getBusinessObject("com.dummy.time.TimeProvider"), which fails, as TimeProvider is not a Business interface. As per , the businessInterfaceType must be a type of the business interface of the bean. Is Weld incorrect in mapping the method to its declaring interface. Weld must instead use the injected type as the business interface, while trying to get the business object.