String factoryName = cfRef.getFactoryClassName();
Class factoryClass = Class.forName(factoryName);
ConnectionFactoryObjectFactory factory = (ConnectionFactoryObjectFactory)factoryClass.newInstance();
Object instance = factory.getObjectInstance(cfRef, null, null, null);
ProxyAssertSupport.assertTrue(instance instanceof HornetQConnectionFactory);
HornetQJMSConnectionFactory cf2 = (HornetQJMSConnectionFactory)instance;