*/
private boolean findProviderAndStartService(String name,
Properties properties, boolean bootTime)
throws StandardException {
PersistentService actualProvider = null;
Properties serviceProperties = null;
String serviceName = null;
// see if the name already includes a service type
int colon = name.indexOf(':');
if (colon != -1) {
actualProvider = findProviderFromName(name, colon);
// if null is returned here then its a sub-sub protocol/provider
// that we don't understand. Attempt to load it as an untyped name.
// If we have a protool
// that we do understand and we can't open the service we will
// throw an exception
if (actualProvider != null) {
serviceName = actualProvider.getCanonicalServiceName(name);
if (serviceName == null)
return true; // we understand the type, but the service does not exist
serviceProperties =
actualProvider.getServiceProperties(serviceName, properties);
if (serviceProperties == null)
return true; // we understand the type, but the service does not exist
// see if this service does not want to be auto-booted.
if (bootTime && Boolean.valueOf(serviceProperties.getProperty(Property.NO_AUTO_BOOT)).booleanValue())
return true;
startProviderService(actualProvider, serviceName, serviceProperties);
return true; // we understand the type
}
}
StandardException savedMse = null;
for (Enumeration e = new ProviderEnumeration( properties); e.hasMoreElements(); ) {
PersistentService provider = (PersistentService) e.nextElement();
String sn = provider.getCanonicalServiceName(name);
if (sn == null)
continue;
Properties p = null;
try {
p = provider.getServiceProperties(sn, properties);
// service does not exist.
if (p == null)
continue;
} catch (StandardException mse) {