Package com.acciente.induction.controller

Examples of com.acciente.induction.controller.Controller


                          HttpServletRequest             oRequest,
                          HttpServletResponse            oResponse,
                          Throwable                      oError )
      throws ControllerExecutorException
   {
      Controller  oController;

      try
      {
         oController = _oControllerPool.getController( oResolution.getClassName() );
      }
      catch ( ClassNotFoundException e )
      {
         throw new ControllerExecutorException( oResolution.getClassName(), oResolution.getMethodName(), "unable to load class definition", e );
      }
      catch ( ConstructorNotFoundException e )
      {
         throw new ControllerExecutorException( oResolution.getClassName(),
                                                oResolution.getMethodName(),
                                                "unable to find constructor", e );
      }
      catch ( InstantiationException e )
      {
         throw new ControllerExecutorException( oResolution.getClassName(),
                                                oResolution.getMethodName(),
                                                "instantiate error", e );
      }
      catch ( InvocationTargetException e )
      {
         throw new ControllerExecutorException( oResolution.getClassName(),
                                                oResolution.getMethodName(),
                                                "target exception", e );
      }
      catch ( IllegalAccessException e )
      {
         throw new ControllerExecutorException( oResolution.getClassName(),
                                                oResolution.getMethodName(),
                                                "access exception", e );
      }
      catch ( ParameterProviderException e )
      {
         throw new ControllerExecutorException( oResolution.getClassName(),
                                                oResolution.getMethodName(),
                                                "parameter exception", e );
      }

      // use performance enhanced reflection to determine the methods in the controller with the specified name
      Method oControllerMethod;
      try
      {
         oControllerMethod = ReflectUtils.getSingletonMethod( oController.getClass(),
                                                              oResolution.getMethodName(),
                                                              oResolution.isIgnoreMethodNameCase() );
      }
      catch ( MethodNotFoundException e )
      {
View Full Code Here


      // the class definition may have changed so we have to load the class unconditionally our
      // classloader caches so if the class is unchanged this call just returns the last loaded class
      Class oLatestControllerClass = _oClassLoader.loadClass( sControllerClassName );

      // check if we have a cached controller instance
      Controller  oController = ( Controller ) _oControllerCache.get( sControllerClassName );

      if ( oController == null )
      {
         // no controller instance in cache so create one and cache
         _oControllerCache.put( sControllerClassName, oController = createController( oLatestControllerClass ) );
      }
      else
      {
         // ok there is a cached entry, check if the controller class has changed since the instance was cached
         if ( oController.getClass().hashCode() != oLatestControllerClass.hashCode() )
         {
            // yes the class has been reloaded so decommission the previous controller
            // and then create a new controller instance
            ObjectFactory.destroyObject( oController );
View Full Code Here

TOP

Related Classes of com.acciente.induction.controller.Controller

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.