[jboss-jira] [JBoss JIRA] (WFLY-947) Constructor injection on EJB interceptors not working
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Thu Jun 20 03:41:21 EDT 2013
[ https://issues.jboss.org/browse/WFLY-947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783180#comment-12783180 ]
Jozef Hartinger commented on WFLY-947:
--------------------------------------
Testcase is at https://github.com/weld/core/blob/2.0/tests-arquillian/src/test/java/org/jboss/weld/tests/interceptors/injection/ejb/EjbInterceptorInjectionTest.java
> Constructor injection on EJB interceptors not working
> -----------------------------------------------------
>
> Key: WFLY-947
> URL: https://issues.jboss.org/browse/WFLY-947
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Reporter: Patrick Ruckstuhl
> Assignee: Jozef Hartinger
>
> Using JBoss 7.1 I use an EJB intercepter and would like to use constructor inject. This does not seem to work, but normal injection works fine.
> This one fails with
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011056: No default constructor for interceptor class
> public class CacheInterceptor {
> private final DummyCache myCache;
> @Inject
> public CacheInterceptor(final DummyCache myCache) {
> this.myCache = myCache;
> }
> @AroundInvoke
> public Object intercept(final InvocationContext ctx) throws Exception {
> ....
> }
> }
> but this works fine and DummyCache gets injected
> public class CacheInterceptor {
> @Inject
> private DummyCache myCache;
> public CacheInterceptor() {
> }
> @AroundInvoke
> public Object intercept(final InvocationContext ctx) throws Exception {
> ....
> }
> }
--
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
More information about the jboss-jira
mailing list