Microconatiner and @Depends, @Service annotations ...
jc7442 Aug 7, 2007 9:56 AMI implement a service :
@Service(objectName = "babar:service=auditLock") @Management(BabarAuditManagerBean.class) public class AuditLock implements BabarAuditManagerBean { ...
This service is used in a session bean injecting by the annotation depends:
@Depends("babar:service=auditLock") BabarAuditManagerBean babarManager;
It works fine in JBoss 4.2.0.
I perform some unit tests in microcontainer. Consequently in microcontaienr I explicitely deploy my service as a class. When conatiner try to inject the service I have the following exception:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:546) at java.util.ArrayList.get(ArrayList.java:321) at org.jboss.injection.DependsFieldInjector.inject(DependsFieldInjector.java:64) at org.jboss.injection.DependsFieldInjector.inject(DependsFieldInjector.java:50) at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:101) at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:61) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:105) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214) at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184) at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
@depends, @Service annotations, are they supposed to work with JBoss microcontainer ?
Is there something special to do for the deployment ?
Helps and sample are welcome