0 Replies Latest reply on Apr 3, 2008 1:47 AM by Subrata Saha

    how to prevent others to deploy queue using MBeanServerConne

    Subrata Saha Newbie

      my problem is i have following program which others can write and deploy a queue in my machine ...

      public static void deployQueue(String queueName,InitialContext ic) throws Exception {
      MBeanServerConnection mBeanServer = lookupMBeanServerProxy();

      ObjectName serverObjectName = new ObjectName(

      mBeanServer.invoke(serverObjectName, "deployQueue", new Object[] {
      queueName, queueName, 2000, 2, 2 }, new String[] {
      "java.lang.String", "java.lang.String", "int", "int", "int" });

      System.out.println("Queue " + queueName + " deployed");

      public static MBeanServerConnection lookupMBeanServerProxy()
      throws Exception {

      Properties p = new Properties();
      p.put(Context.PROVIDER_URL, "jnp://");
      InitialContext ctx = new InitialContext(p);
      return (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");

      How can i configure it so that others can not deploy the queue ??