public void configPropertiesUpdated ( Dictionary < String , String > properties ) { if ( HttpServiceTracker . propertiesEqual ( properties , configProperties ) ) return ; configProperties = properties ; ServiceReference reference = context . getServiceReference ( HttpService . class . getName ( ) ) ; if ( reference == null ) return ; HttpService httpService = ( HttpService ) context . getService ( reference ) ; String oldAlias = this . getAlias ( ) ; this . changeServletProperties ( servlet , properties ) ; String alias = properties . get ( BaseWebappServlet . ALIAS ) ; boolean restartRequired = false ; if ( ! oldAlias . equals ( alias ) ) restartRequired = true ; else if ( servlet instanceof WebappServlet ) restartRequired = ( ( WebappServlet ) servlet ) . restartRequired ( ) ; if ( ! restartRequired ) return ; try { httpService . unregister ( oldAlias ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; // Should not happen } this . properties . put ( BaseWebappServlet . ALIAS , alias ) ; if ( servlet instanceof WebappServlet ) if ( ( ( WebappServlet ) servlet ) . restartRequired ( ) ) { ( ( WebappServlet ) servlet ) . free ( ) ; servlet = null ; } this . addingService ( reference ) ; // Start it back up }
Update the servlet s properties . Called when the configuration changes .