Setting first token because observer is invoked without setting the current context
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/resource-registry-handlers@148244 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ac9d29e413
commit
21b7ee7ee8
|
@ -579,7 +579,11 @@ public class EServiceManager extends ApplicationLifecycleHandler {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void createOrUpdateServiceStateFacet(EService eService, String state) throws ResourceRegistryException {
|
||||
|
||||
String previousToken = SecurityTokenProvider.instance.get();
|
||||
if (previousToken == null) {
|
||||
setContextFromToken((String) applicationContext.configuration().startTokens().toArray()[0]);
|
||||
}
|
||||
|
||||
ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
|
||||
Thread.currentThread().setContextClassLoader(EServiceManager.class.getClassLoader());
|
||||
|
||||
|
|
Loading…
Reference in New Issue