temporaryObject = (moduleClass.newInstance());
muleContext.getRegistry().registerObject(moduleClass.getName(), temporaryObject);
}
else
{
throw new ConfigurationException(MessageFactory.createStaticMessage("Cannot find object"));
}
}
}
if (temporaryObject instanceof String)
{
temporaryObject = (muleContext.getExpressionManager().evaluate(((String) temporaryObject),
muleEvent, true));
if (temporaryObject == null)
{
throw new ConfigurationException(
MessageFactory.createStaticMessage("Cannot find object by config name"));
}
}
return temporaryObject;
}