Package javax.security.jacc

Examples of javax.security.jacc.PolicyContextException


    public Object getContext(String key, Object data) throws PolicyContextException {
        try {
            return Subject.getSubject(AccessController.getContext());
        } catch (Exception e) {
            throw new PolicyContextException(e);
        }
    }
View Full Code Here


            } else if (pae.getException() instanceof InstantiationException) {
                throw new ClassNotFoundException(factoryClassName[0] + " could not be instantiated");
            } else if (pae.getException() instanceof IllegalAccessException) {
                throw new ClassNotFoundException("Illegal access to " + factoryClassName);
            }
            throw new PolicyContextException(pae.getException());
        }
    }
View Full Code Here

            } else if (pae.getException() instanceof InstantiationException) {
                throw new ClassNotFoundException(factoryClassName[0] + " could not be instantiated");
            } else if (pae.getException() instanceof IllegalAccessException) {
                throw new ClassNotFoundException("Illegal access to " + factoryClassName);
            }
            throw new PolicyContextException(pae.getException());
        }
    }
View Full Code Here

            } else if (pae.getException() instanceof InstantiationException) {
                throw new ClassNotFoundException(factoryClassName[0] + " could not be instantiated");
            } else if (pae.getException() instanceof IllegalAccessException) {
                throw new ClassNotFoundException("Illegal access to " + factoryClassName);
            }
            throw new PolicyContextException(pae.getException());
        }
    }
View Full Code Here

   synchronized ContextPolicy getContextPolicy(String contextID)
      throws PolicyContextException
   {
      ContextPolicy policy = (ContextPolicy) openPolicies.get(contextID);
      if (policy == null)
         throw new PolicyContextException("No ContextPolicy exists for contextID=" + contextID);
      return policy;
   }
View Full Code Here

         configStateMachine.nextState(action);
      }
      catch(IllegalTransitionException e)
      {
         log.debug("validateState failure", e);
         throw new PolicyContextException("Operation not allowed", e);
      }
   }
View Full Code Here

            if (pcf == null) {
                try {
                    pcf = PolicyConfigurationFactory.getPolicyConfigurationFactory();
                } catch (ClassNotFoundException cnfe) {
                    _logger.severe("jaccfactory.notfound");
                    throw new PolicyContextException(cnfe);
                } catch (PolicyContextException pce) {
                    _logger.severe("jaccfactory.notfound");
                    throw pce;
                }
            }
View Full Code Here

    public GeronimoPolicyConfiguration getGeronimoPolicyConfiguration(String contextID) throws PolicyContextException {
        GeronimoPolicyConfiguration configuration = (GeronimoPolicyConfiguration) configurations.get(contextID);

        if (configuration == null) {
            throw new PolicyContextException("No policy configuration registered for contextID: " + contextID);
        }

        log.trace("Get policy configuration " + contextID);
        return configuration;
    }
View Full Code Here

    public Object getContext(String key, Object data) throws PolicyContextException {
        try {
            return ContextManager.getCurrentCaller();
        } catch (Exception e) {
            throw new PolicyContextException(e);
        }
    }
View Full Code Here

               factoryName = action.getName();
               Exception e = ex.getException();
               if (e instanceof ClassNotFoundException)
                  throw (ClassNotFoundException) e;
               else
                  throw new PolicyContextException("Failure during load of class: "+action.getName(), e);
            }
           
            factory = (PolicyConfigurationFactory) clazz.newInstance();
         }
         catch (ClassNotFoundException e)
         {
            String msg = "Failed to find PolicyConfigurationFactory : " + factoryName;
            throw new ClassNotFoundException(msg, e);
         }
         catch (IllegalAccessException e)
         {
            String msg = "Unable to access class : " + factoryName;
            throw new PolicyContextException(msg, e);
         }
         catch (InstantiationException e)
         {
            String msg = "Failed to create instance of: " + factoryName;
            throw new PolicyContextException(msg, e);
         }
         catch (ClassCastException e)
         {
            StringBuffer msg = new StringBuffer(factoryName + " Is not a PolicyConfigurationFactory, ");
            msg.append("PCF.class.CL: "+Ejb3PolicyConfigurationFactory.class.getClassLoader());
View Full Code Here

TOP

Related Classes of javax.security.jacc.PolicyContextException

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.