From 00bde957450b51329665605fcb21735409ac131a Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Wed, 13 Mar 2024 14:42:45 +0100 Subject: [PATCH 1/3] Prepare next development cycle --- sdk/branches/unstable.bnd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/branches/unstable.bnd b/sdk/branches/unstable.bnd index 060ef94..2838996 100644 --- a/sdk/branches/unstable.bnd +++ b/sdk/branches/unstable.bnd @@ -1,7 +1,7 @@ major=2 minor=3 micro=24 -qualifier= +qualifier=.next Bundle-Copyright= \ Copyright 2014-2023 Argeo GmbH, \ -- 2.30.2 From 2bbcbb0d550896645d6a908bd30b7d1c940f0b95 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Tue, 7 May 2024 19:55:45 +0200 Subject: [PATCH 2/3] Revert loading of XSD --- .../argeo/app/core/SuiteContentNamespace.java | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/org.argeo.app.core/src/org/argeo/app/core/SuiteContentNamespace.java b/org.argeo.app.core/src/org/argeo/app/core/SuiteContentNamespace.java index 4645649..be4238f 100644 --- a/org.argeo.app.core/src/org/argeo/app/core/SuiteContentNamespace.java +++ b/org.argeo.app.core/src/org/argeo/app/core/SuiteContentNamespace.java @@ -1,21 +1,16 @@ package org.argeo.app.core; -import static java.lang.System.Logger.Level.ERROR; - import java.net.MalformedURLException; -import java.net.URI; import java.net.URL; import java.util.Objects; import org.argeo.api.acr.spi.ContentNamespace; -import org.argeo.cms.acr.CmsContentNamespace; public enum SuiteContentNamespace implements ContentNamespace { // // ARGEO // - ENTITY("entity", "http://www.argeo.org/ns/entity", - "platform:/plugin/org.argeo.app.api/org/argeo/api/app/entity.xsd", null), + ENTITY("entity", "http://www.argeo.org/ns/entity", "/org/argeo/app/api/entity.xsd", null), // ARGEO_DBK("argeodbk", "http://www.argeo.org/ns/argeodbk", null, null), // @@ -70,22 +65,28 @@ public enum SuiteContentNamespace implements ContentNamespace { Objects.requireNonNull(namespace); this.namespace = namespace; if (resourceFileName != null) { - try { - // FIXME workaround when in nested OSGi frameworks - // we should use class path, as before - if (!resourceFileName.startsWith("platform:")) { - resource = URI.create("platform:/plugin/org.argeo.app.core" + RESOURCE_BASE + resourceFileName) - .toURL(); - } else { - resource = URI.create(resourceFileName).toURL(); - } - } catch (MalformedURLException e) { - resource = null; - System.getLogger(CmsContentNamespace.class.getName()).log(ERROR, - "Cannot load " + resourceFileName + ": " + e.getMessage()); - // throw new IllegalArgumentException("Cannot convert " + resourceFileName + " - // to URL"); - } + if (!resourceFileName.startsWith("/")) + resource = getClass().getResource(RESOURCE_BASE + resourceFileName); + else + resource = getClass().getResource(resourceFileName); +// Objects.requireNonNull(resource); + +// try { +// // FIXME workaround when in nested OSGi frameworks +// // we should use class path, as before +// if (!resourceFileName.startsWith("platform:")) { +// resource = URI.create("platform:/plugin/org.argeo.app.core" + RESOURCE_BASE + resourceFileName) +// .toURL(); +// } else { +// resource = URI.create(resourceFileName).toURL(); +// } +// } catch (MalformedURLException e) { +// resource = null; +// System.getLogger(CmsContentNamespace.class.getName()).log(ERROR, +// "Cannot load " + resourceFileName + ": " + e.getMessage()); +// // throw new IllegalArgumentException("Cannot convert " + resourceFileName + " +// // to URL"); +// } // Objects.requireNonNull(resource); } if (publicUrl != null) -- 2.30.2 From be7369eeb92a2e5d791e13266d09833151a9fb44 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Wed, 8 May 2024 09:00:57 +0200 Subject: [PATCH 3/3] Janitor thread per instance --- .../src/org/argeo/app/swt/ux/SwtArgeoApp.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swt/org.argeo.app.swt/src/org/argeo/app/swt/ux/SwtArgeoApp.java b/swt/org.argeo.app.swt/src/org/argeo/app/swt/ux/SwtArgeoApp.java index d123aa0..851d686 100644 --- a/swt/org.argeo.app.swt/src/org/argeo/app/swt/ux/SwtArgeoApp.java +++ b/swt/org.argeo.app.swt/src/org/argeo/app/swt/ux/SwtArgeoApp.java @@ -95,7 +95,9 @@ public class SwtArgeoApp extends AbstractArgeoApp implements CmsEventSubscriber // private CmsUserManager cmsUserManager; // TODO make more optimal or via CmsSession/CmsView - private static Timer janitorTimer = new Timer(true); + // It works if static, but there is no clean way to get rid of it, so we open + // one per app + private Timer janitorTimer = new Timer(true); private Map> managedUis = new HashMap<>(); // ACR @@ -189,6 +191,8 @@ public class SwtArgeoApp extends AbstractArgeoApp implements CmsEventSubscriber if (log.isDebugEnabled()) log.info("Argeo Suite App stopped"); + // clean janitor timer so that th thread is not kept + janitorTimer.cancel(); } @Override -- 2.30.2