{
String providerURINonNull = (providerURI==null)?EPServiceProviderSPI.DEFAULT_ENGINE_URI:providerURI;
if (runtimes.containsKey(providerURINonNull))
{
EPServiceProviderImpl provider = runtimes.get(providerURINonNull);
if (provider.isDestroyed())
{
provider = new EPServiceProviderImpl(configuration, providerURINonNull, runtimes);
runtimes.put(providerURINonNull, provider);
}
else
{
provider.setConfiguration(configuration);
}
return provider;
}
// New runtime
EPServiceProviderImpl runtime = new EPServiceProviderImpl(configuration, providerURINonNull, runtimes);
runtimes.put(providerURINonNull, runtime);
runtime.postInitialize();
return runtime;
}