/** * @see org.apache.avalon.framework.configuration.Reconfigurable#reconfigure(org.apache.avalon.framework.configuration.Configuration) * @param configuration the configuration * @throws ConfigurationException if unable to configure */ public void reconfigure(Configuration configuration) throws ConfigurationException { Validate.notNull( configuration, "configuration" ); Object rawInstance = this.getRawInstance(false); if( rawInstance instanceof Reconfigurable ) { try { this.getParentLogger().debug( "Reconfigurable.reconfigure() for " + this.getShorthand() ); ((Reconfigurable) rawInstance).reconfigure(configuration); } catch (Throwable t) { String msg = "Reconfiguring the following service failed : " + this.getShorthand(); this.getParentLogger().error(msg,t); throw new RuntimeException(msg); } } } }
/** * @see org.apache.avalon.framework.configuration.Reconfigurable#reconfigure(org.apache.avalon.framework.configuration.Configuration) * @param configuration * @throws ConfigurationException */ public void reconfigure(Configuration configuration) throws ConfigurationException { Validate.notNull( configuration, "configuration" ); Object rawInstance = this.getRawInstance(false); if( rawInstance instanceof Reconfigurable ) { try { this.getParentLogger().debug( "Reconfigurable.reconfigure() for " + this.getShorthand() ); ((Reconfigurable) rawInstance).reconfigure(configuration); } catch (Throwable t) { String msg = "Reconfiguring the following service failed : " + this.getShorthand(); this.getParentLogger().error(msg,t); throw new RuntimeException(msg); } } } }
((Reconfigurable) this.serviceManager).reconfigure(configuration);
((Reconfigurable) this.serviceManager).reconfigure(configuration);