diff --git a/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java b/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java index a006efd..dea5380 100644 --- a/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java +++ b/src/main/java/org/gcube/dataharvest/AccountingDataHarvesterPlugin.java @@ -80,6 +80,23 @@ public class AccountingDataHarvesterPlugin extends Plugin contextAuthorization = new InheritableThreadLocal() { + + @Override + protected ContextAuthorization initialValue() { + try { + return new ContextAuthorization(); + } catch(Exception e) { + throw new RuntimeException("Unable to instantiate ContextAuthorization"); + } + } + }; + + public static InheritableThreadLocal getContextAuthorization() { + return contextAuthorization; + } + /** {@inheritDoc} */ @Override public void launch(Map inputs) throws Exception { @@ -138,7 +155,7 @@ public class AccountingDataHarvesterPlugin extends Plugin