13 Replies Latest reply on Feb 13, 2009 7:04 PM by Andrew Rubinger

    AS5 @Spring injection failing

    Gina Hope Newbie

      I am trying to upgrade from AS 4.2.1 to AS 5. Everything was working correctly in 4.2.1. I can't get the spring beans injected into by EJB3 using @Spring. I'm getting a null pointer exception in most of my beans. I see that the interceptor is only getting called for one of my EJBs.

      I've upgraded to use the correct spring deployer (3.1). I can see all the beans in my rules-spring.xml are instantiated. I see this in the JMX console: rules (class: org.jboss.spring.factory.NamedXmlApplicationContext)

      Below is the ejb-interceptors.xml

      <interceptor class="org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.asynchronous.AsynchronousInterceptor" scope="PER_CLASS"/>
       <interceptor class="org.jboss.ejb3.ENCPropagationInterceptor" scope="PER_VM"/>
       <interceptor name="Basic Authorization" factory="org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/>
       <interceptor name="JACC Authorization" factory="org.jboss.ejb3.security.JaccAuthorizationInterceptorFactory" scope="PER_CLASS"/>
       <interceptor factory="org.jboss.ejb3.security.AuthenticationInterceptorFactory" scope="PER_CLASS"/>
       <interceptor factory="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/>
       <interceptor class="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.stateless.StatelessInstanceInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.stateful.StatefulInstanceInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.service.ServiceSingletonInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.cache.StatefulReplicationInterceptor" scope="PER_VM"/>
       <interceptor factory="org.jboss.ejb3.stateful.StatefulRemoveFactory" scope="PER_CLASS_JOINPOINT"/>
       <interceptor factory="org.jboss.ejb3.tx.BMTTxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
       <interceptor factory="org.jboss.ejb3.tx.CMTTxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
       <!-- interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/ -->
       <interceptor factory="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory" scope="PER_CLASS"/>
       <interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.spring.interceptor.SpringInjectionInterceptor" scope="PER_VM"/>
       <interceptor factory="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory" scope="PER_CLASS"/>
       <interceptor class="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor" scope="PER_VM"/>
       <interceptor class="org.jboss.ejb3.BlockContainerShutdownInterceptor" scope="PER_VM"/>
       <interceptor factory="org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory" scope="PER_CLASS"/>


      I see the following in the logs:


      2009-02-13 21:19:23,465 DEBUG [org.jboss.aop.microcontainer.beans.Aspect] (main) Bound aspect org.jboss.spring.interceptor.SpringInjectionInterceptor; deployed:true


      I know that it's finding the interceptor

      2009-02-13 21:20:16,876 DEBUG [org.jboss.ejb3.deployers.Ejb3Deployer] (main) ********* Ejb3Deployer Begin Unit: rules-engine.ear jar: rules-engine.ear
      2009-02-13 21:20:16,877 DEBUG [org.jboss.ejb3.Ejb3Deployment] (main) EJB3 deployment time took: 1
      2009-02-13 21:20:16,878 DEBUG [org.jboss.ejb3.deployers.Ejb3Deployer] (main) ********* Ejb3Deployer Begin Unit: general-admin.jar jar: general-admin.jar
      2009-02-13 21:20:17,058 DEBUG [org.jboss.ejb3.interceptors.metadata.InterceptorMetaDataBridge] (main) ======> Creating interceptor metadata bridge
      2009-02-13 21:20:17,205 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice InvocationContextInterceptor with loader null
      2009-02-13 21:20:17,220 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.spring.interceptor.SpringInjectionInterceptor with loader null
      2009-02-13 21:20:17,227 INFO [org.jboss.spring.interceptor.SpringInjectionInterceptor] (main) Instantiating SpringInjectionInterceptor
      2009-02-13 21:20:17,231 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor with loader null
      2009-02-13 21:20:17,232 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.BlockContainerShutdownInterceptor with loader null
      2009-02-13 21:20:17,236 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.asynchronous.AsynchronousInterceptor with loader BaseClassLoader@1dea382{vfsfile:/C:/jboss-5.0.0.GA/server/all/conf/jboss-service.xml}
      2009-02-13 21:20:17,247 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.ENCPropagationInterceptor with loader null
      2009-02-13 21:20:17,250 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.AuthenticationInterceptorFactory
      2009-02-13 21:20:17,254 DEBUG [org.jboss.ejb3.security.AuthenticationInterceptorFactory] (main) Creating interceptor with authentication manager 'null'
      2009-02-13 21:20:17,258 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.RunAsSecurityInterceptorFactory
      2009-02-13 21:20:17,262 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.aspects.tx.TxPropagationInterceptor with loader null
      2009-02-13 21:20:17,268 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,295 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.stateless.StatelessInstanceInterceptor with loader null
      2009-02-13 21:20:17,297 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,300 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.AllowedOperationsInterceptor with loader null
      2009-02-13 21:20:17,302 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor with loader null
      2009-02-13 21:20:17,304 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory
      2009-02-13 21:20:17,312 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,313 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,313 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,313 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,313 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,314 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,314 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,314 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,329 DEBUG [org.jboss.ejb3.Ejb3AnnotationHandler] (main) found EJB3: ejbName=AdminBean, class=com.studio.admin.AdminBean, type=STATELESS
      2009-02-13 21:20:17,341 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,341 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,341 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,342 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,342 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,342 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,342 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,342 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,343 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,343 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,343 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) no declared remote bindings for : AdminBean
      2009-02-13 21:20:17,343 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) there is remote interfaces for AdminBean
      2009-02-13 21:20:17,343 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) default remote binding has jndiName of rules-engine/AdminBean/remote
      2009-02-13 21:20:17,348 DEBUG [org.jboss.ejb3.Ejb3Registry] (main) Registered container jboss.j2ee:ear=rules-engine.ear,jar=general-admin.jar,name=AdminBean,service=EJB3,VMID=549ba69e2552b50c:543fbaab:11f7181c834:-7ffa
      2009-02-13 21:20:17,349 DEBUG [org.jboss.ejb3.interceptors.metadata.InterceptorMetaDataBridge] (main) ======> Creating interceptor metadata bridge
      2009-02-13 21:20:17,377 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.asynchronous.AsynchronousInterceptor with loader BaseClassLoader@1dea382{vfsfile:/C:/jboss-5.0.0.GA/server/all/conf/jboss-service.xml}
      2009-02-13 21:20:17,377 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.AuthenticationInterceptorFactory
      2009-02-13 21:20:17,377 DEBUG [org.jboss.ejb3.security.AuthenticationInterceptorFactory] (main) Creating interceptor with authentication manager 'null'
      2009-02-13 21:20:17,377 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.RunAsSecurityInterceptorFactory
      2009-02-13 21:20:17,377 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,379 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,380 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory
      2009-02-13 21:20:17,380 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,380 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,380 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,381 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,381 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,381 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,382 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,382 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,382 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,382 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,383 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,383 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,384 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,384 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,384 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,384 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,385 DEBUG [org.jboss.ejb3.Ejb3AnnotationHandler] (main) found EJB3: ejbName=AgencyBean, class=com.studio.admin.agency.AgencyBean, type=STATELESS
      2009-02-13 21:20:17,392 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,392 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,392 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,392 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,393 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,393 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,393 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,393 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,393 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,394 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,394 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,394 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,394 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,394 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,395 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,395 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,395 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,395 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,396 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) no declared remote bindings for : AgencyBean
      2009-02-13 21:20:17,396 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) there is remote interfaces for AgencyBean
      2009-02-13 21:20:17,396 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) default remote binding has jndiName of rules-engine/AgencyBean/remote
      2009-02-13 21:20:17,396 DEBUG [org.jboss.ejb3.Ejb3Registry] (main) Registered container jboss.j2ee:ear=rules-engine.ear,jar=general-admin.jar,name=AgencyBean,service=EJB3,VMID=549ba69e2552b50c:543fbaab:11f7181c834:-7ffa
      2009-02-13 21:20:17,400 DEBUG [org.jboss.ejb3.interceptors.metadata.InterceptorMetaDataBridge] (main) ======> Creating interceptor metadata bridge
      2009-02-13 21:20:17,428 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.asynchronous.AsynchronousInterceptor with loader BaseClassLoader@1dea382{vfsfile:/C:/jboss-5.0.0.GA/server/all/conf/jboss-service.xml}
      2009-02-13 21:20:17,428 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.AuthenticationInterceptorFactory
      2009-02-13 21:20:17,428 DEBUG [org.jboss.ejb3.security.AuthenticationInterceptorFactory] (main) Creating interceptor with authentication manager 'null'
      2009-02-13 21:20:17,428 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.RunAsSecurityInterceptorFactory
      2009-02-13 21:20:17,428 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,428 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,428 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory
      2009-02-13 21:20:17,429 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,429 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,429 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,429 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,429 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,430 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,430 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,430 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,430 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,430 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,431 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,431 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,431 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,431 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,431 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,432 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,433 DEBUG [org.jboss.ejb3.Ejb3AnnotationHandler] (main) found EJB3: ejbName=AdminUserBean, class=com.studio.admin.user.AdminUserBean, type=STATELESS
      2009-02-13 21:20:17,439 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,439 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,439 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,440 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,440 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,440 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,440 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,440 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,441 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,441 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,441 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,441 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,441 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,442 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,442 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,442 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,442 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,442 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,443 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) no declared remote bindings for : AdminUserBean
      2009-02-13 21:20:17,443 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) there is remote interfaces for AdminUserBean
      2009-02-13 21:20:17,443 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) default remote binding has jndiName of rules-engine/AdminUserBean/remote
      2009-02-13 21:20:17,443 DEBUG [org.jboss.ejb3.Ejb3Registry] (main) Registered container jboss.j2ee:ear=rules-engine.ear,jar=general-admin.jar,name=AdminUserBean,service=EJB3,VMID=549ba69e2552b50c:543fbaab:11f7181c834:-7ffa
      2009-02-13 21:20:17,446 DEBUG [org.jboss.ejb3.interceptors.metadata.InterceptorMetaDataBridge] (main) ======> Creating interceptor metadata bridge
      2009-02-13 21:20:17,463 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.asynchronous.AsynchronousInterceptor with loader BaseClassLoader@1dea382{vfsfile:/C:/jboss-5.0.0.GA/server/all/conf/jboss-service.xml}
      2009-02-13 21:20:17,463 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.AuthenticationInterceptorFactory
      2009-02-13 21:20:17,464 DEBUG [org.jboss.ejb3.security.AuthenticationInterceptorFactory] (main) Creating interceptor with authentication manager 'null'
      2009-02-13 21:20:17,464 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.RunAsSecurityInterceptorFactory
      2009-02-13 21:20:17,464 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,464 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,464 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.connectionmanager.CachedConnectionInterceptorFactory
      2009-02-13 21:20:17,465 DEBUG [org.jboss.ejb3.Ejb3AnnotationHandler] (main) found EJB3: ejbName=UserStatBean, class=com.studio.admin.userstat.UserStatBean, type=STATELESS
      2009-02-13 21:20:17,467 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.CMTTxInterceptorFactory
      2009-02-13 21:20:17,467 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.tx.BMTTxInterceptorFactory
      2009-02-13 21:20:17,468 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) no declared remote bindings for : UserStatBean
      2009-02-13 21:20:17,468 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) there is remote interfaces for UserStatBean
      2009-02-13 21:20:17,468 DEBUG [org.jboss.ejb3.session.ProxyDeployer] (main) default remote binding has jndiName of rules-engine/UserStatBean/remote
      2009-02-13 21:20:17,468 DEBUG [org.jboss.ejb3.Ejb3Registry] (main) Registered container jboss.j2ee:ear=rules-engine.ear,jar=general-admin.jar,name=UserStatBean,service=EJB3,VMID=549ba69e2552b50c:543fbaab:11f7181c834:-7ffa
      2009-02-13 21:20:17,473 DEBUG [org.jboss.ejb3.interceptors.metadata.InterceptorMetaDataBridge] (main) ======> Creating interceptor metadata bridge
      2009-02-13 21:20:17,503 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.asynchronous.AsynchronousInterceptor with loader BaseClassLoader@1dea382{vfsfile:/C:/jboss-5.0.0.GA/server/all/conf/jboss-service.xml}
      2009-02-13 21:20:17,522 DEBUG [org.jboss.aop.microcontainer.beans.GenericBeanAspectFactory] (main) Creating advice org.jboss.ejb3.security.AuthenticationInterceptorFactory
      2009-02-13 21



      Here is the code that has the @Spring annotation

      import java.util.List;
      
      import javax.ejb.Stateless;
      import javax.ejb.TransactionAttribute;
      import javax.ejb.TransactionAttributeType;
      
      import org.jboss.annotation.ejb.Clustered;
      import org.jboss.annotation.spring.Spring;
      
      import com.studio.admin.agency.dao.AgencyDao;
      import com.studio.admin.agency.model.Agency;
      import com.studio.admin.agency.model.AgencyContact;
      import com.studio.util.LOG4JLogger;
      
      /**
       * EJB class used to handle data of agency and agency contacts.
       * @author lquevedo@studiocom.com
       * @version 1.0
       */
      @Stateless
      @Clustered
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
      public class AgencyBean implements AgencyRemote {
      
       @Spring(jndiName = "rules", bean = "agencyDao")
       private AgencyDao agencyDao;
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#getAgencies()
       */
       public List<Agency> getAgencies() {
       return agencyDao.getAgencies();
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#getAgency(java.lang.Long)
       */
       public Agency getAgency(Long agencyId) {
       return agencyDao.getAgency(agencyId);
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#getAgencyContacts(java.lang.String)
       */
       public List<AgencyContact> getAgencyContacts(Long agencyId) {
       return agencyDao.getAgencyContacts(agencyId);
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#insertAgency(com.studio\.admin.agency.model.Agency)
       */
       public void insertAgency(Agency agency) {
       try {
       agencyDao.insertAgency(agency);
       } catch (Exception e) {
       LOG4JLogger.error("ERROR AGENCY BEAN: insertAgency ", e);
       }
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#updateAgency(com.studio.admin.agency.model.Agency)
       */
       public void updateAgency(Agency agency) {
       try {
       agencyDao.updateAgency(agency);
       } catch (Exception e) {
       LOG4JLogger.error("ERROR AGENCY BEAN: updateAgency ", e);
       }
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#deleteAgency(com.studio.admin.agency.model.Agency)
       */
       public void deleteAgency(Agency agency) {
       try {
       agencyDao.deleteAgency(agency);
       } catch (Exception e) {
       LOG4JLogger.error("ERROR AGENCY BEAN: deleteAgency ", e);
       }
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#insertAgencyContact(com.studio.admin.agency.model.AgencyContact)
       */
       public void insertAgencyContact(AgencyContact agencyContact) {
       try {
       agencyDao.insertAgencyContact(agencyContact);
       } catch (Exception e) {
       LOG4JLogger.error("ERROR AGENCY BEAN: insertAgencyContact ", e);
       }
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#updateAgencyContact(com.studio.admin.agency.model.AgencyContact)
       */
       public void updateAgencyContact(AgencyContact agencyContact) {
       try {
       agencyDao.updateAgencyContact(agencyContact);
       } catch (Exception e) {
       LOG4JLogger.error("ERROR AGENCY BEAN: updateAgencyContact ", e);
       }
      
       }
      
       /* (non-Javadoc)
       * @see com.studio.admin.AgencyRemote#deleteAgencyContact(com.studio.admin.agency.model.AgencyContact)
       */
       public void deleteAgencyContact(AgencyContact agencyContact) {
       try {
       agencyDao.deleteAgencyContact(agencyContact);
       } catch (Exception e) {
       LOG4JLogger.error("ERROR AGENCY BEAN: deleteAgencyContact ", e);
       }
       }
      }