Just an explanation :
Let us suppose we have two instances of server instance A and instance B. Instance B is created by copying var/* to myserver/var*.
Step 1: Deploy an application to the server instance A. The application goes to the common repository. Access the config.xml for instance A...entry is created for the application deployed. Access the config.xml for instance B....no entry created.
Step 2: Now access the admin console for instance B-- EAR or WAR portlet ( depending on the type of the application). Now check the config.xml for instance B. An entry for the application is created in the config.xml however with load=false.
Step 3: Start the application in instance B config.xml entry changes to load=true.
Step 4: Uninstall the application from instance A..Admin console entry is removed for entry A as well as B. Verify the config.xml for A and B. Entry from A is removed however entry from B is not removed.
So this is the first problem we hit.
I am uploading a patch for this issue. However this works only when the admin console EAR or WAR portlet is accessed for that particular instance.
In case the admin console from instance B is not accessed the entry will still remain however there are no side effects.
Second problem comes when instance B is restarted.
If instance B is restarted after un-installation of application but w/o accessing the admin console than in that case the entry in config.xml for instance B will still remain present so restart will fail as instance B will not be able to to find the module in the configuration store. So to fix this issue another patch has to be generated I hope by using the shutdown hooks whose run method will just do the same thing as the patch uploaded, however just before shutdown.
In my opinion these two fixes will take care of the multiple server instances w/o introducing much complexity.
Please review the approach. The patch is just a rough one and I will create a neat one if the approach is agreeable.