common/src/main/java/org/beiter/michael/authn/jaas/common/messageq/MessageQFactory.java
@SuppressWarnings("PMD.NonThreadSafeSingleton")
    public static MessageQ getSingleton(final String className, final CommonProperties properties)
            throws FactoryException {

        Validate.notBlank(className, "The validated character sequence 'className' is null or empty");
        Validate.notNull(properties, "The validated object 'properties' is null");

        // The double-check idiom is safe and acceptable here (Bloch, 2nd ed. p 284)
        if (messageQInstance == null) {
            synchronized (MessageQFactory.class) {
                if (messageQInstance == null) {

                    messageQInstance = getInstance(className, properties);
                }
            }
        }

        return messageQInstance;
    }
@SuppressWarnings("PMD.NonThreadSafeSingleton")
    public static MessageQ getSingleton(final String className, final CommonProperties properties)
            throws FactoryException {

        Validate.notBlank(className, "The validated character sequence 'className' is null or empty");
        Validate.notNull(properties, "The validated object 'properties' is null");

        // The double-check idiom is safe and acceptable here (Bloch, 2nd ed. p 284)
        if (messageQInstance == null) {
            synchronized (MessageQFactory.class) {
                if (messageQInstance == null) {

                    messageQInstance = getInstance(className, properties);
                }
            }
        }

        return messageQInstance;
    }
Return a singleton, fully initialized instance of a {@link MessageQ} class to use for JAAS event messageing.
<p>
Retrieving a singleton by this method will cause the factory to keep state, and store a reference to the
singleton for later use. You may reset the factory state using the {@code reset()} method to retrieve a new
/ different singleton the next time this method is called..
<p>
Note that any properties of the singleton (e.g. configuration) cannot necessarily be changed easily. You may call
the singleton's {@code init()} method, but depending on the implementation provided by the respective class, this
may or may not have the expected effect.
<p>
If you need tight control over the singleton, including its lifecycle and configuration, or you require more than
one singleton that are different in their internal state (e.g. with different configurations), then you should
create such objects with the {@code getInstance()} method and maintain their state as "singletons" in your
application's business logic.
<p>
Classes implementing the {@link MessageQ} interface <b>must</b> be thread safe.

@param className  The name of a class that implements the Message interface
@param properties The properties to initialize the instance with
@return An instance of a class implementing the {@link MessageQ} interface
@throws FactoryException         When the class cannot be instantiated
@throws NullPointerException     When the {@code className} or {@code properties} are {@code null}
@throws IllegalArgumentException When {@code className} is empty