public static DaoFactory getInstance()	{
		if(factory == null) {
			String classname = PropertyManager.getProperty("persistence.factory");
			if (classname != null) try {
				factory = (DaoFactory) Class.forName(classname).newInstance();
			} catch( Exception e) {
				//TODO log this exception with Log4J
				System.err.println( e );
			}
			// fall back to a default
			if (factory == null) factory = new JpaDaoFactory();
		}
		return factory;
	}