title: SpringBeanAutowiringInterceptor for MDB on Weblogic injection failure
body: <p>I have a JavaEE 6 application using EJB and Spring 4 with a simple MDB that receive a single bean injection, but, each time I send a message to this MDB, below log appears:</p>
  
  <pre><code>com.oracle.pitchfork.interfaces.LifecycleCallbackException: Failure to invoke public void org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(javax.interceptor.InvocationContext) on bean class class  app.module.mdb.impl.SpringBeanAutowiringInterceptor2_curj4r_Impl with args: [LifecycleEventCallbackInvocationContext(1495657191)]
  
  ..
  
  Caused By: org.springframework.beans.factory.BeanCreationException: Injection of autowired dependencies failed for class [class app.module.mdb.impl.TestMDB]; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private app.module.bizo.impl.TestBOImpl  app.module.mdb.impl.TestMDB.bizo; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [app.module.bizo.impl.TestBOImpl] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  </code></pre>
  
  <p>I'd like to know what I´m doing wrong, since I have everything properly configured.</p>
  
  <p>MDB:</p>
  
  <pre><code>@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
          @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
          @ActivationConfigProperty(propertyName = "connectionFactoryJndiName") })
  @TransactionManagement(TransactionManagementType.CONTAINER)
  @Interceptors(SpringBeanAutowiringInterceptor2.class)
  public class TestMDB implements MessageListener {
  
      @Autowired
      private TestBO bizo;
  
      @Logging
      @Override
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
      public void onMessage(final Message message) {
          try {
  
              this.bizo.process(message);
          } catch (final Exception e) {
              throw new RuntimeException(e.getCause());
          }
  
      }
  
  }
  </code></pre>
  
  <p>BO:</p>
  
  <pre><code>@Component
  public class TestBOImpl implements TestBO, Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = 1L;
  
      @Override
      public void process(Message message) throws BusinessException {
          System.out.println("Im here!");
  
      }
  
  }
  </code></pre>
  
  <p>Config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" 
      xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
      xmlns:task="http://www.springframework.org/schema/task"
      xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
      http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
      http://www.springframework.org/schema/util    http://www.springframework.org/schema/util/spring-util-4.0.xsd
      http://www.springframework.org/schema/task    http://www.springframework.org/schema/task/spring-task-4.0.xsd"&gt;
  
  
      &lt;context:annotation-config /&gt;
      &lt;context:component-scan base-package="app.module" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>XML Ref:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans
      xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"&gt;
  
      &lt;bean id="IDContext" class="org.springframework.context.support.ClassPathXmlApplicationContext"&gt;
          &lt;constructor-arg value="/META-INF/app-config.xml" /&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>Thanks.</p>