[JBoss JIRA] Created: (WELD-557) InjectionTarget methods called with a proxied instance
by Jozef Hartinger (JIRA)
InjectionTarget methods called with a proxied instance
------------------------------------------------------
Key: WELD-557
URL: https://jira.jboss.org/browse/WELD-557
Project: Weld
Issue Type: Bug
Affects Versions: 1.0.1.Final
Reporter: Jozef Hartinger
Priority: Critical
Fix For: 1.0.2.CR1
Let's have a bean whose InjectionTarget is wrapped by an extension to provide additional dependency injection, etc...
Although it is not explicitly stated in the spec, it is obvious that inject(), postConstruct() and preDestroy() methods of the InjectionTarget should be called with the actual raw bean instance and not with a client proxy.
org.jboss.weld.tests.extensions.injectionTarget.InjectionTargetTest
(Consider moving the test into the TCK if the presumtion can be implied)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (WELD-462) Injection into EJB Interceptor classes does not occur
by Ian (JIRA)
Injection into EJB Interceptor classes does not occur
-----------------------------------------------------
Key: WELD-462
URL: https://jira.jboss.org/jira/browse/WELD-462
Project: Weld
Issue Type: Bug
Affects Versions: 1.0.1.Final
Environment: JBoss 6.0.0 M2 with Weld 1.0.1 Final, on Windows XP SP3 and JDK 1.6
Reporter: Ian
An interceptor for an EJB (not a Weld interceptor) is a contained managed class, yet it is not being injected with any dependencies.
Some example code:
public class FaultBarrierInterceptor {
@Inject
private Logger log;
@AroundInvoke
public Object intercept(final InvocationContext invocationContext)
throws Exception {
try {
return invocationContext.proceed();
}
catch (RuntimeException e) {
log.error("An uncaught exception was caught: \n-METHOD: " + invocationContext.getMethod() + "\n-PARAMS: " +
Arrays.toString(invocationContext.getParameters()));
throw new MyUncaughtException(e);
}
}
}
When you debug this code, the logger variable is not injected.
The code for the EJB has a local interface (it's an EJB 3.0 structure, not 3.1). The interceptor definition is:
@Stateless
@Interceptors( {FaultBarrierInterceptor.class})
public class OptinServiceBean
implements OptinService {
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months