/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param parameter the parameter to pass to the action * @param action the action to run under association * @param <T> the action return type * @param <P> the action parameter type * @return the action return value */ public <T, P> T run(P parameter, ParametricPrivilegedAction<T, P> action) { return runFunction(action, parameter); }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param action the action to run * @param <T> the action return type * @return the action result (may be {@code null}) */ public <T> T runAsSupplier(Supplier<T> action) { return runFunction(Supplier::get, action); }
private RemoteUserTransaction getRemoteUserTransaction() { AuthenticationContext context = providerEnvironment.getAuthenticationContextSupplier().get(); return context.runFunction(RemoteTransactionContext::getUserTransaction, RemoteTransactionContext.getInstance()); }
Object readResolve() { AuthenticationContext context = AuthenticationContext.captureCurrent(); final NamingProvider currentNamingProvider = NamingProvider.getCurrentNamingProvider(); if (currentNamingProvider != null) { final ProviderEnvironment providerEnvironment = currentNamingProvider.getProviderEnvironment(); context = providerEnvironment.getAuthenticationContextSupplier().get(); } return context.runFunction(RemoteTransactionContext::getUserTransaction, RemoteTransactionContext.getInstancePrivate()); } }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param parameter the parameter to pass to the action * @param action the action to run under association * @param <T> the action return type * @param <P> the action parameter type * @return the action return value */ public <T, P> T run(P parameter, ParametricPrivilegedAction<T, P> action) { return runFunction(action, parameter); }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param action the action to run * @param <T> the action return type * @return the action result (may be {@code null}) */ public <T> T runAsSupplier(Supplier<T> action) { return runFunction(Supplier::get, action); }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param parameter the parameter to pass to the action * @param action the action to run under association * @param <T> the action return type * @param <P> the action parameter type * @return the action return value */ public <T, P> T run(P parameter, ParametricPrivilegedAction<T, P> action) { return runFunction(action, parameter); }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param action the action to run * @param <T> the action return type * @return the action result (may be {@code null}) */ public <T> T runAsSupplier(Supplier<T> action) { return runFunction(Supplier::get, action); }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param parameter the parameter to pass to the action * @param action the action to run under association * @param <T> the action return type * @param <P> the action parameter type * @return the action return value */ public <T, P> T run(P parameter, ParametricPrivilegedAction<T, P> action) { return runFunction(action, parameter); }
/** * Run a privileged action with this authentication context associated for the duration of the task. * * @param action the action to run * @param <T> the action return type * @return the action result (may be {@code null}) */ public <T> T runAsSupplier(Supplier<T> action) { return runFunction(Supplier::get, action); }
private RemoteUserTransaction getRemoteUserTransaction() { AuthenticationContext context = providerEnvironment.getAuthenticationContextSupplier().get(); return context.runFunction(RemoteTransactionContext::getUserTransaction, RemoteTransactionContext.getInstance()); }
private RemoteUserTransaction getRemoteUserTransaction() { AuthenticationContext context = providerEnvironment.getAuthenticationContextSupplier().get(); return context.runFunction(RemoteTransactionContext::getUserTransaction, RemoteTransactionContext.getInstance()); }
Object readResolve() { AuthenticationContext context = AuthenticationContext.captureCurrent(); final NamingProvider currentNamingProvider = NamingProvider.getCurrentNamingProvider(); if (currentNamingProvider != null) { final ProviderEnvironment providerEnvironment = currentNamingProvider.getProviderEnvironment(); context = providerEnvironment.getAuthenticationContextSupplier().get(); } return context.runFunction(RemoteTransactionContext::getUserTransaction, RemoteTransactionContext.getInstancePrivate()); } }
Object readResolve() { AuthenticationContext context = AuthenticationContext.captureCurrent(); final NamingProvider currentNamingProvider = NamingProvider.getCurrentNamingProvider(); if (currentNamingProvider != null) { final ProviderEnvironment providerEnvironment = currentNamingProvider.getProviderEnvironment(); context = providerEnvironment.getAuthenticationContextSupplier().get(); } return context.runFunction(RemoteTransactionContext::getUserTransaction, RemoteTransactionContext.getInstancePrivate()); } }