public interface ConfigMXBean
In its first version MXBeans are envisioned only for ServiceInstanceDescriptors and not for other general Jps Configuration elements such as JpsConfiguration, ServiceProviderDescriptor, JpsContext etc. This decision was arrived at during the discussion based on the first draft of the Approach/Architecture document.
A Configuration MXBean is expected to make use of a Concrete Configuration Bean as a Delegate. The configuration bean for a Service is supplied by the ServiceProvider Descriptor as an instanceConfigBeanClass property. All Configuration changes to a ServiceInstance should be performed via the Configuration MXBean or the underlying Configuration Bean.The higher level methods in a Concrete MXBean which are prefixed by configure, such as configureLDAPIdentityStore, configureLDAPIdentityStoreWithLibOvd etc would internally try to call persist() since they are trying to create a new ServiceInstanceDescriptor. This is happening in the current implementation of the MXBean (JpsConfigBeanImpl.java).
The apply() operation on a ConfigBean is expected to be propagate the configuration changes to a running ServiceInstance if the nature of changes are such that the Service Instance can refresh itself with the changed configuration. If the changes require a restart of the service instance then that would be indicated as a result of apply() call.Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply a local change to the Service Configuration on the ApplicationServer instance.
|
java.lang.String |
getName() |
boolean |
hasChanges() |
boolean |
hasUnAppliedChanges() |
void |
persist()
Persist the changes to this ConfigBean to the persistent store.
|
java.lang.String getName()
void apply() throws javax.management.MBeanException
When invoked on a DAS the current thinking is to make use of the Portable JMX Framework API calls to propagate the changes to the managed servers.
javax.management.MBeanException
- if the underlying Config Bean indicates that the changes made to the Config Bean are such that the Service needs to be restarted for it to uptake the changes.void persist() throws javax.management.MBeanException
This should be executed on the DAS and we may need to prevent a persist call on any of the managed servers. The Application Server's file synchronization will then ensure that persistent config change is synchronized to the Managed Server;s upon start of the Cluster. Otherwise an update on Managed Server could be lost during startup synchronization.
The current plan is to make use of the Protable JMX Framework to propagate the changes made on DAS to the Managed Server Instances.javax.management.MBeanException
- if the underlying Config Bean indicates that the changes made to the Config Bean are such that the Service needs to be restarted for it to uptake the changes. Or if the underlying Config bean indicates that a Mandatory Property required by the service was not setboolean hasUnAppliedChanges()
boolean hasChanges()