public static void setFactory(IFactory myFactory) {
		if (INSTANCE==null) {
			INSTANCE = myFactory;
		} else {
			throw new RuntimeException("Factory has already been set to value [" + INSTANCE.getClass().getName() + "]");
		}
	}
public static void setFactory ( IFactory myFactory ) { if ( INSTANCE == null ) { INSTANCE = myFactory ; } else { throw new RuntimeException ( "Factory has already been set to value [" + INSTANCE . getClass ( ) . getName ( ) + "]" ) ; } }
This method was designed to be called just one time at application startup.
This could be done in a single static block of a single class, that perhaps
grabbed the name of the Factory impl from a -D parameter or similar.
If this method detects that its already been called, it throws a runtime exception.
I did that so the developer will know whether the "worst case" has happened (ie, when multiple code locations are trying to set the factory).
@param myFactory