object = context.lookup(jndiName);
if (object != null) cacheManager = (CacheManager)object;
} catch (ClassCastException err) {
I18n msg = InfinispanConnectorI18n.objectFoundInJndiWasNotCacheManager;
String className = object != null ? object.getClass().getName() : "null";
throw new RepositorySourceException(getName(), msg.text(jndiName, this.getName(), className), err);
} catch (Throwable err) {
if (err instanceof RuntimeException) throw (RuntimeException)err;
throw new RepositorySourceException(getName(), err);
}
}