/** * Synchronous notification of a new transactional configuration change operation. * * @param events list of changes */ void addTransaction( final List<PropertyChangeEvent> events) { addTransaction(events, true); }
@Override public void postConstruct() { transactions.addTransactionsListener(this); }
/** amx-impl has its own TransactionListener which takes over once AMX is loaded. Note that it is synchronized with transactionCommited() [sic] to avoid a race condition. */ public synchronized void swapTransactionListener(final TransactionListener newListener) { //debug( "PendingConfigBeans.swapTransactionListener()" ); transactions.addTransactionsListener(newListener); transactions.removeTransactionsListener(this); }
@Override public void postConstruct() { domain = habitat.getService(Domain.class); transactions.addListenerForType(ContainerMonitoring.class, this); transactions.addListenerForType(MonitoringService.class, this); transactions.addListenerForType(ModuleMonitoringLevels.class, this); // wbn: This value sticks for the life of the bootstrapping. If the user changes it // somehow during bootstrapping we would have some problems so we just get the value // and run with it... boolean enableMonitoring = (monitoringService != null) ? Boolean.parseBoolean(monitoringService.getMonitoringEnabled()) && monitoringService.isAnyModuleOn() : false; //Don't listen for any events and dont process any probeProviders or statsProviders (dont set delegate) if (enableMonitoring) { enableMonitoring(false); } }
transactions.addTransactionsListener(myListener); transactions.waitForDrain(); transactions.removeTransactionsListener(myListener);
public void stop() { mTransactions.removeTransactionsListener(this); SingletonEnforcer.deregister(AMXConfigLoader.class, this); }
public void postConstruct() { mTransactions.addTransactionsListener(this); }
@Override public void postConstruct() { if (virtualizations==null) { transactions.addListenerForType(Virtualizations.class, new ConfigListener() { @Override public UnprocessedChangeEvents changed(PropertyChangeEvent[] propertyChangeEvents) { services.forContract(IAAS.class).get(); return null; } }); } else { services.forContract(IAAS.class).get(); } } }
public void postConstruct() { mTransactions.addTransactionsListener(this); }
public void waitForDrain() { // insert a dummy Job and block until is has been processed. This guarantees // that all prior jobs have finished addTransaction( new ArrayList<PropertyChangeEvent>(), true ); // at this point all prior transactions are guaranteed to have cleared } }
public IAASImpl(@Inject(optional = true) Virtualizations virtualizations, @Inject Transactions transactions, @Inject ServerEnvironment env, @Inject final Services services) { this.services = services; // first executeAndWait the fping command to populate our arp table. transactions.addListenerForType(Virtualization.class, this); if (virtualizations==null) { transactions.addListenerForType(Virtualizations.class, new ConfigListener() { @Override public UnprocessedChangeEvents changed(PropertyChangeEvent[] propertyChangeEvents) { Virtualizations virts = services.forContract(Virtualizations.class).get(); for (Virtualization virt : virts.getVirtualizations()) { processVirtualization(virt); } Dom.unwrap(virts).addListener(IAASImpl.this); return null; } }); } else { Dom.unwrap(virtualizations).addListener(this); } if (virtualizations==null || env.isInstance() ) return; for (Virtualization virt : virtualizations.getVirtualizations()) { processVirtualization(virt); } }
public void postConstruct() { Properties arguments = startupContext.getArguments(); if (arguments != null) { boolean isUpgrade = Boolean.valueOf( arguments.getProperty(UPGRADE_PARAM)); if (isUpgrade) { // we don't want to register this listener for the upgrade // start up return; } } transactions.addTransactionsListener(this); }
((WriteableView) t).getMasterView().getHabitat().<Transactions>getService(Transactions.class).addTransaction(transactionChanges); break;
@Override public void postConstruct() { domain = habitat.getService(Domain.class); cluster = habitat.getService(Cluster.class, ServerEnvironment.DEFAULT_INSTANCE_NAME); config = habitat.getService(Config.class, ServerEnvironment.DEFAULT_INSTANCE_NAME); server = habitat.getService(Server.class, ServerEnvironment.DEFAULT_INSTANCE_NAME); jc = config.getJavaConfig(); if (jc != null) { // register to listen for config events on the JavaConfig ((ObservableBean)ConfigSupport.getImpl(jc)).addListener(this); } if (jc != null && jc.getJvmOptions() != null) { oldProps = new ArrayList<String>(jc.getJvmOptions()); //defensive copy oldAttrs = collectAttrs(jc); } transactions.addListenerForType(SystemProperty.class, this); }
habitat.getComponent(Transactions.class).addTransactionsListener(new TransactionListener() { public void transactionCommited(List<PropertyChangeEvent> changes) { for (ConfigurationPersistence pers : habitat.getAllByContract(ConfigurationPersistence.class)) {
/** * Synchronous notification of a new transactional configuration change operation. * * @param events list of changes */ void addTransaction( final List<PropertyChangeEvent> events) { addTransaction(events, true); }
bean = (ObservableBean) ConfigSupport.getImpl(config.getHttpService()); bean.addListener(configListener); transactions.addListenerForType(SystemProperty.class, configListener); configListener.setGrizzlyService(this);
habitat.<Transactions>getService(Transactions.class).addTransactionsListener(new TransactionListener() { public void transactionCommited(List<PropertyChangeEvent> changes) { if (!isGlassFishDocumentChanged(changes)) {
/** * Synchronous notification of a new transactional configuration change operation. * * @param events list of changes */ void addTransaction( final List<PropertyChangeEvent> events) { addTransaction(events, true); }
transactions.addListenerForType(SystemProperty.class, configListener);