sounds like a good idea.

from what class should I start to do that?

[]

Leo

On Tue, Apr 7, 2015 at 12:08 PM, Romain Manni-Bucau <[email protected]>
wrote:

> You dont want to stop the mdb but the amq listener no? Check amq
> resourceadapter rather than openejb internals maybe
> Le 7 avr. 2015 16:26, "Leonardo K. Shikida" <[email protected]> a écrit :
>
> > Hi
> >
> > I am trying to control a specific MDB using TomEE internals like this
> >
> >         SystemInstance inst = SystemInstance.get();
> >         ContainerSystem container =
> > inst.getComponent(ContainerSystem.class);
> >         Container ctn = container.getContainer("msg");
> >
> >         BeanContext myBeanContext = null;
> >         BeanContext[] deployments = container.deployments();
> >         for(BeanContext d:deployments) {
> >             if (d.getId().equals("myMDBName")) {
> >                 myBeanContext = d;
> >                 break;
> >             }
> >         }
> >
> >         try {
> >             ctn.stop(myBeanContext);
> >         }catch(Exception e) {
> >             e.printStackTrace();
> >         }
> >
> > But when I enqueue a new JMS message, the MDB is still consuming it.
> >
> > Am I missing something here?
> >
> > No exception is raised, could not find any javadoc explaining.
> >
> > TIA
> >
> > Leo
> >
>

Reply via email to