1 17 package org.apache.servicemix.components.jmx; 18 19 import org.apache.servicemix.jbi.jaxp.StringSource; 20 import org.apache.servicemix.tck.TestSupport; 21 import org.springframework.context.support.AbstractXmlApplicationContext; 22 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext; 23 24 27 public class CounterMonitorComponentTest extends TestSupport { 28 29 public void testCounter() throws Exception { 30 int nb = 10; 31 for (int i = 0; i < nb; i++) { 32 client.send(null, new StringSource("<hello>world</hello>")); 33 Thread.sleep(50); 36 } 37 receiver.getMessageList().assertMessagesReceived(nb); 38 } 39 40 protected AbstractXmlApplicationContext createBeanFactory() { 41 return new ClassPathXmlApplicationContext("org/apache/servicemix/components/jmx/example.xml"); 42 } 43 44 45 } 46 | Popular Tags |