boolean initialize)
throws InitializationException
{
try
{
MatchingRuleFactory factory = null;
MatchingRuleCfgDefn definition =
MatchingRuleCfgDefn.getInstance();
ClassPropertyDefinition propertyDefinition =
definition.getJavaClassPropertyDefinition();
Class<? extends MatchingRuleFactory> matchingRuleFactoryClass =
propertyDefinition.loadClass(className,
MatchingRuleFactory.class);
factory = matchingRuleFactoryClass.newInstance();
if (initialize)
{
Method method = factory.getClass().getMethod(
"initializeMatchingRule", configuration.configurationClass());
method.invoke(factory, configuration);
}
else
{
Method method =
factory.getClass().getMethod("isConfigurationAcceptable",
MatchingRuleCfg.class,
List.class);
List<Message> unacceptableReasons = new ArrayList<Message>();
Boolean acceptable = (Boolean) method.invoke(factory,