@Test(timeout = 1000) public void testDestination() throws Exception { // Create sample destination ActiveMQDestination dest = (ActiveMQDestination) ActiveMQJMSClient.createQueue(RandomUtil.randomString()); // Create reference Reference ref = JNDIReferenceFactory.createReference(dest.getClass().getName(), dest); // Get object created based on reference ActiveMQDestination temp; JNDIReferenceFactory refFactory = new JNDIReferenceFactory(); temp = (ActiveMQDestination)refFactory.getObjectInstance(ref, null, null, null); // Check settings assertEquals(dest.getAddress(), temp.getAddress()); } }
temp = (ActiveMQConnectionFactory)refFactory.getObjectInstance(ref, null, null, null);