2 Replies Latest reply on Oct 24, 2002 2:12 AM by Tej

    Creating a queue programmatically via a URL

    Tej Newbie

      I have tried the folloeing code snippet to create a queue in an application:

      String method = "newQueue";
      String destName = "myCreated";

      String action = "action=" + method + "?action=" + method + "&param0%2Bjava.lang.String=" + destName;
      String arg = "/InvokeAction//JBossMQ%3Aservice%3DServer" + "/" + action;
      URL url = new URL("http", "localhost", 8082, arg);

      HttpURLConnection con = (HttpURLConnection)url.openConnection();

      When I run this code, the queue doesn't get created. When the use the generated URL directly in the browser, I get the following message:

      459 Instance Not Found

      Unable to get Object Definition for [JBossMQ:service=Server]

      What is wrong here? I am using jboss-3.0.0_tomcat-4.0.3