4 Replies Latest reply on Dec 4, 2009 12:18 PM by Mike Sacauskis

    Creating Queues Programaticly

    Mike Sacauskis Newbie

      I've seen the messages that are referenced from the jboss messaging home page at
      http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3973130#3973130

      It says

      To see an example of how this works, take a look at DestinationManagerTest.testCreateQueueProgramatically()


      Where can I find that code?

        • 2. Re: Creating Queues Programaticly
          Mike Sacauskis Newbie

          It blows up on my when I try to run it:

          java.lang.Exception: Failed to start ServiceContainer
          at org.jboss.test.messaging.tools.container.ServiceContainer.start(ServiceContainer.java:490)
          at org.jboss.test.messaging.tools.container.LocalTestServer.start(LocalTestServer.java:125)
          at org.jboss.test.messaging.tools.ServerManagement.start(ServerManagement.java:218)
          at org.jboss.test.messaging.tools.ServerManagement.start(ServerManagement.java:201)
          at org.jboss.test.messaging.tools.ServerManagement.start(ServerManagement.java:196)
          at org.jboss.test.messaging.tools.ServerManagement.start(ServerManagement.java:183)
          at com.gdit.DestinationManagerTest.setUp(DestinationManagerTest.java:42)
          at junit.framework.TestCase.runBare(TestCase.java:132)
          at junit.framework.TestResult$1.protect(TestResult.java:110)
          at junit.framework.TestResult.runProtected(TestResult.java:128)
          at junit.framework.TestResult.run(TestResult.java:113)
          at junit.framework.TestCase.run(TestCase.java:124)
          at junit.framework.TestSuite.runTest(TestSuite.java:232)
          at junit.framework.TestSuite.run(TestSuite.java:227)
          at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
          at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
          Caused by: java.lang.Exception: Cannot file container's configuration file container.xml. Make sure it is in the classpath.
          at org.jboss.test.messaging.tools.container.ServiceContainer.readConfigurationFile(ServiceContainer.java:1012)
          at org.jboss.test.messaging.tools.container.ServiceContainer.start(ServiceContainer.java:381)
          ... 20 more

          • 3. Re: Creating Queues Programaticly
            Yong Hao Gao Master

            You need to set up the test environment to run the test.
            To save your time, i suggest you read the code and write a simple JMS client yourself.

            A better place to look at would be in <JBM install dir>/examples/common/src/org/jboss/example/jms/common/Util.java

            • 4. Re: Creating Queues Programaticly
              Mike Sacauskis Newbie

              Thanks I'll give that a shot.