/** * Return the abbreviated name of this container for logging messsages */ protected String logName() { String className = this.getClass().getName(); int period = className.lastIndexOf("."); if (period >= 0) className = className.substring(period + 1); return (className + "[" + getName() + "]"); }
/** * Process property change events. * * @param event The property change event that has occurred */ public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), token); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. * * @param event The property change event that has occurred */ @Override public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), token); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
/** * Process property change events. Currently, only listens to such events * on the <code>NamingResources</code> instance for the global naming * resources. * * @param event The property change event that has occurred */ public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
public void mergeRef(NamingResources naming, EnvEntryInfo ref) { ContextEnvironment environment = naming.findEnvironment(ref.name); boolean addEntry = false; if (environment == null) { environment = new ContextEnvironment(); environment.setName(ref.name); addEntry = true; } environment.setType(ref.type); environment.setValue(ref.value); if (addEntry) { naming.addEnvironment(environment); } if (replaceEntry) { ContextAccessController.setWritable(namingContextListener.getName(), standardContext); if (!addEntry) namingContextListener.removeEnvironment(environment.getName()); namingContextListener.addEnvironment(environment); ContextAccessController.setReadOnly(namingContextListener.getName()); } }
@Override public void lifecycleEvent(LifecycleEvent event) { final String type = event.getType(); final StandardContext source = (StandardContext) event.getSource(); if (source.getNamingContextListener() == null) { namingContextListener.setName(source.getName()); source.setNamingContextListener(namingContextListener); } namingContextListener.lifecycleEvent(event); if (Lifecycle.CONFIGURE_START_EVENT.equals(type)) { final Object token = event.getLifecycle(); ContextAccessController.setWritable(namingContextListener.getName(), token); } }