You can get it injected with @Resource. But yes it is done for all
listeners. Otherwise just reroute messages to somewhere else.
 Le 7 avr. 2015 19:17, "Leonardo K. Shikida" <[email protected]> a écrit :

> Nice
>
> and how do I access it? It's not a container, it's a resource
>
> and is there any way to access only the consumer from the right MDB? I
> don't want to stop all MDBs.
>
> []
>
> Leo
>
> On Tue, Apr 7, 2015 at 12:28 PM, Romain Manni-Bucau <[email protected]
> >
> wrote:
>
> > ActiveMQResourceAdapter surely then digging in amq sessions
> > Le 7 avr. 2015 17:16, "Leonardo K. Shikida" <[email protected]> a écrit
> :
> >
> > > 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