Hi everybody,
I had a query regarding stopping and starting MDB.
I have tried the following code :
- ObjectName objectName;
- try {
- objectName = new ObjectName(
- "jboss.j2ee:binding=message-driven-bean, jndiName=jms/SSMListener, plugin=invoker,service=EJB");
- MBeanServer server = MBeanServerLocator.locateJBoss();
- server.invoke(objectName, "stopDelivery", new Object[] {}, null);
- } catch (MalformedObjectNameException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (NullPointerException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (InstanceNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (MBeanException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ReflectionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
But this does't seem to work.There is no exception thrown and the status of the deliveryActive() flag for the MDB on JMX console remains true?
Any pointers on this will be greatly appreciated.
Thanks!