Friday, September 20, 2013

Manage Alfresco through JMX - Revert persistence property from database


We can monitor and manage alfresco through JMX. How to connect alfresco through JMX , Please refer - http://wiki.alfresco.com/wiki/JMX

JMX allows us to change several Alfresco Subsystems configuration without restart of server.
But we must need to know that - this settings are being persisted in database [Not all configurations] and this changes get applied to all nodes in cluster which is NOT always good.

For example you have 2 nodes in cluster and both node has different location for its lucene index .

node1: dir.indexes=/opt/alfresco/lucene/lucene-indexes
node2: dir.indexes=/opt/alfresco/luceneNew/lucene-indexes

Now, if you change node 1 location from JMX then it will also affect node2. and on next restart you can not override changes from your alfresco-global.properties file.
Property value saved in database takes precedence over property file.

How to revert changes

To Revert back this changes, Need to go to Operation tab as shown in below image and click on revert - which will store your default/original value.



Which configuration are persistent

You can know which MBean  properties are persistent from your JMX client [I am using VisualVM].
Go to Metadata tab as shown in below image. MBean with Description as "Persistent Managed Bean" stores property value in Database.





Hope this information will help!

No comments:

Post a Comment