@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 (workManager.getCallbackSecurity() != null) cbh = securityIntegration.createCallbackHandler(workManager.getCallbackSecurity()); cbh = securityIntegration.createCallbackHandler(); if (securityIntegration.getSecurityContext() == null || workManager.getCallbackSecurity().getDomain() != null) sc = securityIntegration.createSecurityContext(scDomain); securityIntegration.setSecurityContext(sc); sc = securityIntegration.getSecurityContext();
SecurityActions.setThreadContextClassLoader(work.getClass().getClassLoader()); org.jboss.jca.core.spi.security.SecurityContext oldSC = securityIntegration.getSecurityContext(); securityIntegration.setSecurityContext(oldSC); SecurityActions.setThreadContextClassLoader(oldCL);
@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(); } }