Package java.security

Examples of java.security.PrivilegedActionException


      if (!isPrivileged() && isTrustedClass(getCallerClass(2))) {
         try {
            PRIVILEGED.set(true);
            return action.run();
         } catch (Exception e) {
            throw new PrivilegedActionException(e);
         } finally {
            PRIVILEGED.remove();
         }
      } else {
         try {
            return action.run();
         } catch (Exception e) {
            throw new PrivilegedActionException(e);
         }
      }
   }
View Full Code Here


      }
      stack.push(subject);
      try {
         return action.run();
      } catch (Exception e) {
         throw new PrivilegedActionException(e);
      } finally {
         stack.pop();
         if (stack.isEmpty()) {
            SUBJECT.remove();
         }
View Full Code Here

      {
         throw e;
      }
      catch (Exception e)
      {
         throw new PrivilegedActionException(e);
      }
   }
View Full Code Here

            {
               return getContextClassLoader().loadClass(name);
            }
            catch ( Exception e)
            {
               throw new PrivilegedActionException(e);
            }
         }
      });
   }
View Full Code Here

        try {
            return action.run();
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new PrivilegedActionException(e);
        } finally {
            thread.setContext(prevContext);
        }
    }
View Full Code Here

        logger.error (e.getMessage (), e);
        throw new IllegalStateException (e.getMessage());
    } catch (InvocationTargetException e) {
        if (e.getTargetException ()
      instanceof PrivilegedActionException) {
      PrivilegedActionException pe
          = (PrivilegedActionException)e.getTargetException();
      if (pe.getException () instanceof IOException) {
      throw (IOException)pe.getException ();
      }
      if (pe.getException() instanceof ServletException) {
          throw (ServletException)pe.getException ();
      }
        }
        logger.error (e.getMessage (), e);
        throw new IllegalStateException (e.getMessage());
    }
View Full Code Here

                try {
                    return op.run();
                } catch (Exception e) {
                    if (e instanceof RuntimeException)
                        throw (RuntimeException) e;
                    throw new PrivilegedActionException(e);
                }
            } else {
                return AccessController.doPrivileged(op, reqACC);
            }
        } catch (Error e) {
View Full Code Here

    try {
        return op.run();
    } catch (Exception e) {
        if (e instanceof RuntimeException)
      throw (RuntimeException) e;
        throw new PrivilegedActionException(e);
    }
      } else {
    return AccessController.doPrivileged(op, reqACC);
      }
  } catch (Error e) {
View Full Code Here

                    }
                    logger.trace("Calling CreationUtils.injectFields for instance");
                    try {
                        CreationUtils.injectFields(instance, classMetadata, RuntimeContextTLS.getRuntimeContext());
                    } catch (IOException e) {
                        throw new PrivilegedActionException(e);
                    }
                    return null;
                }
            });
        } catch (Exception e) {
View Full Code Here

            Thread.currentThread().setContextClassLoader(classLoader);
        }
        try {
            return action.run();
        } catch (Exception e) {
            throw new PrivilegedActionException(e);
        } finally {
            if (tccl != classLoader) {
                Thread.currentThread().setContextClassLoader(tccl);
            }
        }
View Full Code Here

TOP

Related Classes of java.security.PrivilegedActionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.