1 Reply Latest reply on Mar 2, 2009 2:22 AM by jaikiran pai

    Annotations processing does not work with isolated classload

    Stéphane Nicoll Newbie

      Hey,

      We have an application with a couple of beans where the SessionContext is injected through an annotation. We're using 4.2.2

      Everything is working fine. Because we want the EAR file to be deployed alongside another application that uses some shared librairies, we switched the isolation mode by adding the <loader-repository> element in the jboss-app.xml of the ear.

      Since then, the session context is not injected anymore. I tried to switch from field annotation to setter annotation and I can see that the debugger is null.

      See also this stacktrace

      AdminBean(AbstractSessionBean).setSessionContext(SessionContext) line: 53
      NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
      NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
      DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
      Method.invoke(Object, Object...) line: 585
      MethodBeanProperty.set(Object, Object) line: 95
      EJBContextPropertyInjector.inject(BeanContext, Object) line: 50
      EJBContextPropertyInjector.inject(BeanContext) line: 45
      InfinitePool(AbstractPool).create() line: 111
       org.jboss.ejb3.AbstractPool#injectors.length == 0 => SessionContext not set
      InfinitePool.get() line: 49
      ThreadlocalPool.create() line: 50
      ThreadlocalPool.get() line: 90
      StatelessInstanceInterceptor.invoke(Invocation) line: 54
      EJBContainerInvocation<A,T>(MethodInvocation).invokeNext() line: 101
      RoleBasedAuthorizationInterceptor(RoleBasedAuthorizationInterceptor).invoke(Invocation) line: 166
      RoleBasedAuthorizationInterceptor.invoke(Invocation) line: 115
      EJBContainerInvocation<A,T>(MethodInvocation).invokeNext() line: 101
      Ejb3AuthenticationInterceptor(AuthenticationInterceptor).invoke(Invocation) line: 77
      Ejb3AuthenticationInterceptor.invoke(Invocation) line: 110
      EJBContainerInvocation<A,T>(MethodInvocation).invokeNext() line: 101
      ENCPropagationInterceptor.invoke(Invocation) line: 46
      EJBContainerInvocation<A,T>(MethodInvocation).invokeNext() line: 101
      AsynchronousInterceptor.invoke(Invocation) line: 106
      EJBContainerInvocation<A,T>(MethodInvocation).invokeNext() line: 101
      StatelessContainer.dynamicInvoke(Object, Invocation) line: 304
      Dispatcher.invoke(Invocation) line: 106
      AOPRemotingInvocationHandler.invoke(InvocationRequest) line: 82
      SocketServerInvoker(ServerInvoker).invoke(InvocationRequest) line: 769
      ServerThread.processInvocation(SocketWrapper) line: 573
      ServerThread.dorun() line: 373
      ServerThread.run() line: 166