src/main/java/js/container/ConfigurableInstanceProcessor.java
@Override
	public void postProcessInstance(ManagedClassSPI managedClass, Object instance) {
		if (!(instance instanceof Configurable)) {
			return;
		}
		Config config = managedClass.getConfig();
		if (config == null) {
			if(!(instance instanceof OptionalConfigurable)) {
				return;
			}
			log.info("Default configuration for managed class |%s|.", managedClass);
		}

		try {
			((Configurable) instance).config(config);
		} catch (ConfigException e) {
			throw new BugError("Invalid configuration for managed class |%s|:\r\n\t- %s", managedClass, e);
		} catch (Throwable t) {
			throw new BugError(t);
		}
	}
@Override
	public void postProcessInstance(ManagedClassSPI managedClass, Object instance) {
		if (!(instance instanceof Configurable)) {
			return;
		}
		Config config = managedClass.getConfig();
		if (config == null) {
			if(!(instance instanceof OptionalConfigurable)) {
				return;
			}
			log.info("Default configuration for managed class |%s|.", managedClass);
		}

		try {
			((Configurable) instance).config(config);
		} catch (ConfigException e) {
			throw new BugError("Invalid configuration for managed class |%s|:\r\n\t- %s", managedClass, e);
		} catch (Throwable t) {
			throw new BugError(t);
		}
	}
Configure instance with configuration object provided by instance managed class. In order to perform instance
configuration, instance should implement {@link Configurable} and managed class should have configuration object, see
{@link ManagedClassSPI#getConfig()}. If both conditions are satisfied this method executes
{@link Configurable#config(Config)} on instance.

@param managedClass managed class,
@param instance instance of given managed class.
@throws BugError if instance configuration fails either due to invalid configuration object or exception on configuration
user defined logic.