* @param cfm
* @return the configured synonym provider or <code>null</code> if none is
* configured or an error occurs.
*/
public SynonymProvider createSynonymProvider(ConfigurationManager cfm) {
SynonymProvider sp = null;
if (getSynonymProviderClass() != null) {
try {
Class synonymProviderClass = Class.forName(
getSynonymProviderClass(), true, this.getClass()
.getClassLoader());
sp = (SynonymProvider) synonymProviderClass.newInstance();
sp.initialize(createSynonymProviderConfigResource(cfm));
} catch (Exception e) {
log.warn("Exception initializing synonym provider: "
+ getSynonymProviderClass(), e);
sp = null;
}