<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <failOnError>true</failOnError>
+ </configuration>
+ </plugin>
</plugins>
</build>
*/
class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintContainerRestartService {
private static final Logger LOG = LoggerFactory.getLogger(BlueprintContainerRestartServiceImpl.class);
+ private static final int CONTAINER_CREATE_TIMEOUT_IN_MINUTES = 5;
private static final String CONFIG_MODULE_NAMESPACE_PROP = "config-module-namespace";
private static final String CONFIG_MODULE_NAME_PROP = "config-module-name";
private static final String CONFIG_INSTANCE_NAME_PROP = "config-instance-name";
}
try {
- containerCreationComplete.await(5, TimeUnit.MINUTES);
+ if (!containerCreationComplete.await(CONTAINER_CREATE_TIMEOUT_IN_MINUTES, TimeUnit.MINUTES)) {
+ LOG.warn("Failed to restart all blueprint containers within {} minutes. Attempted to restart {} {} "
+ + "but only {} completed restart", CONTAINER_CREATE_TIMEOUT_IN_MINUTES, containerBundles.size(),
+ containerBundles, containerBundles.size() - containerCreationComplete.getCount());
+ return;
+ }
} catch (InterruptedException e) {
LOG.debug("CountDownLatch await was interrupted - returning");
return;
*
* @author Thomas Pantelis
*/
-public class OpendaylightNamespaceHandler implements NamespaceHandler {
+public final class OpendaylightNamespaceHandler implements NamespaceHandler {
public static final String NAMESPACE_1_0_0 = "http://opendaylight.org/xmlns/blueprint/v1.0.0";
static final String ROUTED_RPC_REG_CONVERTER_NAME = "org.opendaylight.blueprint.RoutedRpcRegConverter";
static final String RPC_REGISTRY_NAME = "org.opendaylight.blueprint.RpcRegistry";