@Override protected void runWork() throws WorkCompletedException { // if there is security and elytron is enabled, we need to let the context run the remainder of the work // so the context can run the work as the specified Elytron identity if (securityIntegration.getSecurityContext() != null && ((CallbackImpl) workManager.getCallbackSecurity()).isElytronEnabled()) ((ElytronSecurityContext) securityIntegration.getSecurityContext()).runWork(() -> { try { WildflyWorkWrapper.super.runWork(); } catch (WorkCompletedException e) { ConnectorLogger.ROOT_LOGGER.unexceptedWorkerCompletionError(e.getLocalizedMessage(),e); } }); // delegate to super class if there is no elytron enabled else super.runWork(); } }
if (securityContext != null && workManager.getCallbackSecurity() != null) if (workManager.getCallbackSecurity() != null) cbh = securityIntegration.createCallbackHandler(workManager.getCallbackSecurity()); Subject serviceSubject = null; log.tracef("Callback security: %s", workManager.getCallbackSecurity()); workManager.getCallbackSecurity().getDomain() != null) String scDomain = workManager.getCallbackSecurity().getDomain(); if (workManager.getCallbackSecurity() != null) if (workManager.getCallbackSecurity().getDefaultPrincipal() != null) Principal defaultPrincipal = workManager.getCallbackSecurity().getDefaultPrincipal(); if (workManager.getCallbackSecurity().getDefaultGroups() != null) String[] defaultGroups = workManager.getCallbackSecurity().getDefaultGroups(); else if (securityContext != null && workManager.getCallbackSecurity() == null)
@Override protected void runWork() throws WorkCompletedException { // if there is security and elytron is enabled, we need to let the context run the remainder of the work // so the context can run the work as the specified Elytron identity if (securityIntegration.getSecurityContext() != null && ((CallbackImpl) workManager.getCallbackSecurity()).isElytronEnabled()) ((ElytronSecurityContext) securityIntegration.getSecurityContext()).runWork(() -> { try { WildflyWorkWrapper.super.runWork(); } catch (WorkCompletedException e) { ConnectorLogger.ROOT_LOGGER.unexceptedWorkerCompletionError(e.getLocalizedMessage(),e); } }); // delegate to super class if there is no elytron enabled else super.runWork(); } }
/** * Clone the WorkManager implementation * @return A copy of the implementation * @exception CloneNotSupportedException Thrown if the copy operation isn't supported * */ @Override public WorkManager clone() throws CloneNotSupportedException { WorkManagerImpl wm = (WorkManagerImpl) super.clone(); wm.setId(getId()); wm.setName(getName()); wm.setShortRunningThreadPool(getShortRunningThreadPool()); wm.setLongRunningThreadPool(getLongRunningThreadPool()); wm.setXATerminator(getXATerminator()); wm.setSpecCompliant(isSpecCompliant()); wm.setCallbackSecurity(getCallbackSecurity()); wm.setSecurityIntegration(getSecurityIntegration()); wm.setStatistics(statistics); return wm; }