public class testSend {
private static ApplicationContext appContext = new ClassPathXmlApplicationContext("jms.xml");
private static void send(){
ProducerService producerService = (ProducerService)appContext.getBean("producerService");
producerService.send();
}
private static void receive(){
ConsumerService consumerService = (ConsumerService)appContext.getBean("consumerService");
consumerService.receive();