Class EmbeddedJMSResource

  • All Implemented Interfaces:
    EmbeddedJMSOperations<EmbeddedJMSResource>, org.junit.rules.TestRule

    @Deprecated
    public class EmbeddedJMSResource
    extends org.junit.rules.ExternalResource
    implements EmbeddedJMSOperations<EmbeddedJMSResource>
    Deprecated.
    Deprecated in favor of EmbeddedActiveMQResource. Since Artemis 2.0 all JMS specific broker management classes, interfaces, and methods have been deprecated in favor of their more general counter-parts. A JUnit Rule that embeds an ActiveMQ Artemis JMS server into a test. This JUnit Rule is designed to simplify using embedded servers in unit tests. Adding the rule to a test will startup an embedded JMS server, which can then be used by client applications.
     
     public class SimpleTest {
         @Rule
         public EmbeddedJMSResource server = new EmbeddedJMSResource();
    
         @Test
         public void testSomething() throws Exception {
             // Use the embedded server here
         }
     }