From 3399e1aed762f49ac1e6e03dfcfe2036c207fc34 Mon Sep 17 00:00:00 2001 From: Ruben de Laat Date: Thu, 28 Nov 2019 19:44:48 +0100 Subject: [PATCH] Only initialize protocol buffers meta data if protocol buffers is actually enabled (which by default it is not) --- BimServer/src/org/bimserver/BimServer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BimServer/src/org/bimserver/BimServer.java b/BimServer/src/org/bimserver/BimServer.java index 2f570b183d..82bc9713e4 100644 --- a/BimServer/src/org/bimserver/BimServer.java +++ b/BimServer/src/org/bimserver/BimServer.java @@ -728,9 +728,6 @@ public void pluginBundleUninstalled(PluginBundle pluginBundle) { cleanupStaleData(); - protocolBuffersMetaData = new ProtocolBuffersMetaData(); - protocolBuffersMetaData.load(servicesMap, ProtocolBuffersBimServerClientFactory.class); - serverInfoManager.init(this); webModuleManager = new WebModuleManager(this); @@ -1228,6 +1225,9 @@ private void initDatabaseDependantItems() throws BimserverDatabaseException { Integer protocolBuffersPort = getServerSettingsCache().getServerSettings().getProtocolBuffersPort(); if (protocolBuffersPort >= 1 && protocolBuffersPort <= 65535) { try { + protocolBuffersMetaData = new ProtocolBuffersMetaData(); + protocolBuffersMetaData.load(servicesMap, ProtocolBuffersBimServerClientFactory.class); + protocolBuffersServer = new ProtocolBuffersServer(protocolBuffersMetaData, serviceFactory, servicesMap, protocolBuffersPort); protocolBuffersServer.start(); } catch (Exception e) {