anchor.diff:  	}
   
   	public boolean function onRequestStart(string targetPage){
  -
  +		// Hibernate logging utility
  +		request.hibernateLogging = createObject("HibernateLogging");
  +		
   		// reload application
   		if (structKeyExists(url, "reinit")) {
  +			// remove all appenders to this Logger
  +			request.hibernateLogging.detachAllRequestAppenders();
  +			
   			ormReload();
  -			applicationStop();
  +			try { applicationStop();} catch (any e) {}
   
   			writeOutput("Application reloaded. <a href='//#cgi.http_host##cgi.script_name#'>Continue...</a>");
   			return false;
  
positive.code: 
  	}
  }
  </cfscript>
negative.code: 	}
  
  	public void function onRequestEnd(string targetPage) {
  		// get the Hibernate logging appender and remove it from the logger
  		var appender = request.hibernateLogging.getRequestAppender();
  		request.hibernateLogging.detachRequestAppender();
  		
  		// get the logged events
  		appender.getEvents();
  	}
  
  	public void function onSessionStart(){
  