glassfish
  1. glassfish
  2. GLASSFISH-19738

[regression] Unable to use CDI from MDB

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b77
    • Fix Version/s: 4.0_b80_EE7MS6
    • Component/s: cdi
    • Labels:
      None

      Description

      One of my fighterfish tests has started to fail and I think it is caused by latest Weld integration. It has an MDB which uses CDI and it is getting the following error:

      [#|2013-02-28T01:52:33.068+0530|SEVERE|glassfish 4.0|javax.enterprise.system.container.ejb.mdb.org.glassfish.ejb.mdb|_ThreadID=190;_ThreadName=p: thread-pool-1; w: 7;_TimeMillis=1361996553068;_LevelValue=1000;ClassName=org.glassfish.ejb.mdb.MessageBeanContainer;MethodName=createMessageDrivenEJB;|java.lang.UnsupportedOperationException
      java.lang.UnsupportedOperationException
      at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1061)
      at org.glassfish.weld.services.JCDIServiceImpl._createJCDIInjectionContext(JCDIServiceImpl.java:191)
      at org.glassfish.weld.services.JCDIServiceImpl.createJCDIInjectionContext(JCDIServiceImpl.java:164)
      at com.sun.ejb.containers.BaseContainer.createEjbInstanceAndContext(BaseContainer.java:1637)
      at org.glassfish.ejb.mdb.MessageBeanContainer.createMessageDrivenEJB(MessageBeanContainer.java:727)
      at org.glassfish.ejb.mdb.MessageBeanContainer.access$100(MessageBeanContainer.java:113)
      at org.glassfish.ejb.mdb.MessageBeanContainer$MessageBeanContextFactory.create(MessageBeanContainer.java:527)
      at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:246)
      at org.glassfish.ejb.mdb.MessageBeanContainer._getContext(MessageBeanContainer.java:590)
      at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2534)
      at org.glassfish.ejb.mdb.MessageBeanContainer.beforeMessageDelivery(MessageBeanContainer.java:1038)
      at org.glassfish.ejb.mdb.MessageBeanListenerImpl.beforeMessageDelivery(MessageBeanListenerImpl.java:77)
      at com.sun.enterprise.connectors.inbound.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:139)
      at $Proxy403.beforeDelivery(Unknown Source)
      at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:262)
      at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:107)
      at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
      at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)

      #]

      When I look at Weld's BeanManager code, I see that it indeed does not support MDB:

      public <T> InjectionTarget<T> createInjectionTarget(EjbDescriptor<T> descriptor) {
      if (descriptor.isMessageDriven())

      { throw new UnsupportedOperationException(); }

      InjectionTarget injectionTarget = getBean(descriptor).getProducer();
      ((InjectionTargetService)getServices().get(InjectionTargetService.class)).validateProducer(injectionTarget);
      return injectionTarget;
      }

      Did we know this state of implementation before integrating? If so, when will they start supporting MDB again?

      See [1] where we run this test suite that's now failing. Instructions to run the test suite is available at [2].

      [1] http://gf-hudson.us.oracle.com/hudson/job/gf-trunk-fighterfish-it/4398/
      [2] https://wikis.oracle.com/display/GlassFish/FighterFish+Development+Process#FighterFishDevelopmentProcess-Howtoexecutetests%3F

        Activity

        Hide
        TangYong added a comment -

        Sahoo,

        No Problem, and I want to confirm this test case and whether it is T2_Test.testapp16()?

        Show
        TangYong added a comment - Sahoo, No Problem, and I want to confirm this test case and whether it is T2_Test.testapp16()?
        Hide
        Sanjeeb Sahoo added a comment -

        Yes.

        Show
        Sanjeeb Sahoo added a comment - Yes.
        Hide
        TangYong added a comment -

        Done.

        [Revision]
        59908

        Show
        TangYong added a comment - Done. [Revision] 59908
        Hide
        Sanjeeb Sahoo added a comment -

        JJ,

        Can you please tell what's the ETA for this bug?

        Sahoo

        Show
        Sanjeeb Sahoo added a comment - JJ, Can you please tell what's the ETA for this bug? Sahoo
        Hide
        Sanjeeb Sahoo added a comment -

        Now that new weld has been integrated, renabled in svn #60351.

        Show
        Sanjeeb Sahoo added a comment - Now that new weld has been integrated, renabled in svn #60351.

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: