From cdc81b4517f5cf637c579cd26841ce1b6dc24d41 Mon Sep 17 00:00:00 2001 From: hugh-unicenta Date: Mon, 28 Aug 2023 14:39:25 +0100 Subject: [PATCH] UOCL-244: development --- pom.xml | 2 +- src/main/java/com/unicenta/pos/forms/StartPOS.java | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index b34f638..e24bae6 100644 --- a/pom.xml +++ b/pom.xml @@ -325,7 +325,7 @@ com.unicenta unicenta-plugins - 1.1 + 1.2-SNAPSHOT com.gluonhq diff --git a/src/main/java/com/unicenta/pos/forms/StartPOS.java b/src/main/java/com/unicenta/pos/forms/StartPOS.java index e16cbe4..afdcabf 100644 --- a/src/main/java/com/unicenta/pos/forms/StartPOS.java +++ b/src/main/java/com/unicenta/pos/forms/StartPOS.java @@ -121,10 +121,16 @@ public class StartPOS { } private static void applicationStarted(String host) { new Thread(() -> { - Metrics metrics = new Metrics(); - metrics.setDevice(host); - metrics.setUniCentaVersion(AppLocal.APP_VERSION); - new Application().postMetrics(metrics); + try { + Metrics metrics = new Metrics(); + metrics.setDevice(host); + metrics.setUniCentaVersion(AppLocal.APP_VERSION); + Application application = new Application(); + application.postMetrics(metrics); + application.startEventListener(host); + } catch (Exception e) { + log.error("Problem with starting the uniCenta plugin application:${}", e.getMessage()); + } }).start(); } } \ No newline at end of file