public static FactoryCreator createFactory(Map<String, Object> map) {
		String className = VAL_DEFAULT_FACTORY;
		if(map != null) {
			String temp = (String)map.get(KEY_IMPLEMENTATION_CLASS);
			if(temp != null)
				className = temp;
		}

		FactoryCreator retVal = null;
		try {
//			FactoryCreator.class.getClassLoader().
			Class<? extends FactoryCreator> theClass = Class.forName(className).asSubclass(FactoryCreator.class);
			retVal = theClass.newInstance();
			retVal.configure(map);
//			Class theClass = Class.forName(className);
//			retVal = (PacketProcessorFactory)theClass.newInstance();
		} catch (ClassNotFoundException e) {
			throw new RuntimeException("bug", e);
		} catch (InstantiationException e) {
			throw new RuntimeException("bug", e);
		} catch (IllegalAccessException e) {
			throw new RuntimeException("bug", e);
		}
		
		return retVal; 
	}