InitialContext ctx = null;
String datasourceName;
if (factoryConfiguration instanceof ManagedConnectionFactoryConfiguration) {
ManagedConnectionFactoryConfiguration managedConfiguration = (ManagedConnectionFactoryConfiguration)
factoryConfiguration;
datasourceName = managedConfiguration.jndiUrl();
}
else {
throw new CacheLoaderException("FactoryConfiguration has to be an instance of " +
"ManagedConnectionFactoryConfiguration");
}