You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by "Leonardo K. Shikida" <sh...@gmail.com> on 2013/10/08 18:24:07 UTC
disable MDB
Hi
Is there any way to disable/enable a MDB programmatically?
Right now, it consumes from a JMS queue and the queue definitions are coded
using @ActivationConfigProperty. if I just set a flag in the database and
let the MDB check it before executing the onMessage() message, I guess I'd
have to re-enqueue the message. Instead, I'd like to just "pause" and
"restart" my MDBs, not touching the queue.
TIA
Leo
Re: disable MDB
Posted by "Leonardo K. Shikida" <sh...@gmail.com>.
Rick
sorry, this was really posted in the wrong place.
this is probably something related to tomee or activemq.
[]
Leo
[]
Leo
On Tue, Oct 8, 2013 at 1:36 PM, Rick Curtis <cu...@gmail.com> wrote:
> Leonardo -
>
> If you're looking for something jboss specific, I'd recommend checking with
> one of their mailing lists.
>
> Thanks,
> Rick
>
>
> On Tue, Oct 8, 2013 at 11:33 AM, Leonardo K. Shikida <shikida@gmail.com
> >wrote:
>
> > for example, for tomee/openjpa, is there something similar to this code
> for
> > jboss?
> >
> > MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
> > ObjectName objName = new
> >
> >
> ObjectName("jboss.j2ee:ear=MessageGateway.ear,jar=MessageGateway-EJB.jar,name=MessageSenderMDB,service=EJB3");
> > JMSContainerInvokerMBean invoker = (JMSContainerInvokerMBean)
> > MBeanProxy.get(JMSContainerInvokerMBean.class, objName, mbeanServer);
> >
> > invoker.stop(); //Stop MDB
> > invoker.start(); //Start MDB
> >
> >
> >
> > []
> >
> > Leo
> >
> >
> > On Tue, Oct 8, 2013 at 1:24 PM, Leonardo K. Shikida <shikida@gmail.com
> > >wrote:
> >
> > > Hi
> > >
> > > Is there any way to disable/enable a MDB programmatically?
> > >
> > > Right now, it consumes from a JMS queue and the queue definitions are
> > > coded using @ActivationConfigProperty. if I just set a flag in the
> > database
> > > and let the MDB check it before executing the onMessage() message, I
> > guess
> > > I'd have to re-enqueue the message. Instead, I'd like to just "pause"
> and
> > > "restart" my MDBs, not touching the queue.
> > >
> > > TIA
> > >
> > > Leo
> > >
> >
>
>
>
> --
> *Rick Curtis*
>
Re: disable MDB
Posted by Rick Curtis <cu...@gmail.com>.
Leonardo -
If you're looking for something jboss specific, I'd recommend checking with
one of their mailing lists.
Thanks,
Rick
On Tue, Oct 8, 2013 at 11:33 AM, Leonardo K. Shikida <sh...@gmail.com>wrote:
> for example, for tomee/openjpa, is there something similar to this code for
> jboss?
>
> MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
> ObjectName objName = new
>
> ObjectName("jboss.j2ee:ear=MessageGateway.ear,jar=MessageGateway-EJB.jar,name=MessageSenderMDB,service=EJB3");
> JMSContainerInvokerMBean invoker = (JMSContainerInvokerMBean)
> MBeanProxy.get(JMSContainerInvokerMBean.class, objName, mbeanServer);
>
> invoker.stop(); //Stop MDB
> invoker.start(); //Start MDB
>
>
>
> []
>
> Leo
>
>
> On Tue, Oct 8, 2013 at 1:24 PM, Leonardo K. Shikida <shikida@gmail.com
> >wrote:
>
> > Hi
> >
> > Is there any way to disable/enable a MDB programmatically?
> >
> > Right now, it consumes from a JMS queue and the queue definitions are
> > coded using @ActivationConfigProperty. if I just set a flag in the
> database
> > and let the MDB check it before executing the onMessage() message, I
> guess
> > I'd have to re-enqueue the message. Instead, I'd like to just "pause" and
> > "restart" my MDBs, not touching the queue.
> >
> > TIA
> >
> > Leo
> >
>
--
*Rick Curtis*
Re: disable MDB
Posted by "Leonardo K. Shikida" <sh...@gmail.com>.
for example, for tomee/openjpa, is there something similar to this code for
jboss?
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
ObjectName objName = new
ObjectName("jboss.j2ee:ear=MessageGateway.ear,jar=MessageGateway-EJB.jar,name=MessageSenderMDB,service=EJB3");
JMSContainerInvokerMBean invoker = (JMSContainerInvokerMBean)
MBeanProxy.get(JMSContainerInvokerMBean.class, objName, mbeanServer);
invoker.stop(); //Stop MDB
invoker.start(); //Start MDB
[]
Leo
On Tue, Oct 8, 2013 at 1:24 PM, Leonardo K. Shikida <sh...@gmail.com>wrote:
> Hi
>
> Is there any way to disable/enable a MDB programmatically?
>
> Right now, it consumes from a JMS queue and the queue definitions are
> coded using @ActivationConfigProperty. if I just set a flag in the database
> and let the MDB check it before executing the onMessage() message, I guess
> I'd have to re-enqueue the message. Instead, I'd like to just "pause" and
> "restart" my MDBs, not touching the queue.
>
> TIA
>
> Leo
>