protected void setApplicationObject ( ) { try { Object app = createApplication ( ) ; context . setAttribute ( APP , app ) ; initializer . set ( app ) ; } catch ( Error e ) { LOGGER . log ( Level . SEVERE , "Failed to initialize " + getApplicationName ( ) , e ) ; initializer . setException ( e ) ; throw e ; } catch ( RuntimeException e ) { LOGGER . log ( Level . SEVERE , "Failed to initialize " + getApplicationName ( ) , e ) ; initializer . setException ( e ) ; throw e ; } catch ( Exception e ) { LOGGER . log ( Level . SEVERE , "Failed to initialize " + getApplicationName ( ) , e ) ; initializer . setException ( e ) ; throw new Error ( e ) ; } finally { // in case the above catch clauses miss this. if ( ! initializer . isDone ( ) ) initializer . cancel ( true ) ; } }
Sets the root application object .