1 Reply Latest reply on Oct 16, 2009 2:35 PM by Mac Ferguson

    How to dynamically create Queue and Action in JBOSS ESB

    Stanislav Zelivinski Newbie

      I found on Internet the following example:

      //MBean related imports:
      import javax.management.MBeanServer;
      import javax.management.MBeanServerInvocationHandler;
      import javax.management.ObjectName;
      import org.jboss.mx.util.MBeanServerLocator;

      import org.jboss.mq.server.jmx.DestinationManagerMBean;

      // target MBean: DestinationManager
      ObjectName objectName = new ObjectName("jboss.mq:service=DestinationManager");

      // find the local MBeanServer
      MBeanServer server = MBeanServerLocator.locateJBoss();

      // Get a type-safe dynamic proxy
      DestinationManagerMBean mbean =
      // Use the proxy to dynamically create a queue
      // by providing the queue name and the JNDI location
      mbean.createQueue("myUgatz", "queue/myUgatz");

      Unfortunately, I can not find anywhere the JAR containing DestinationManagerMBean class. Please help to locate it. Great thanks.

      The follow up question that I have is if it is possible to dynamically create ESB action listening on this Queue or End point and Action to be precise. Thanks again,
      Stas Zelivinski