Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODE-1190 Corrected reloading of node types upon restart #156

Merged
merged 1 commit into from Jul 27, 2011

Conversation

rhauch
Copy link
Contributor

@rhauch rhauch commented Jul 27, 2011

I've finally replicated the problem and identified a fix. Normally when restarting the engine reads the node types from the system store, and these node types are usually in a specific order. Somehow, the node types are reordered so that the built-ins are not first in the list, and when registering these the built-ins (often "nt:unstructured" or "nt:base") are not able to be resolved. Fixing the ordering won't help with existing installations, so instead I chose to change RepositoryNodeTypeManager to be more tolerant of the order of the node types by simply iterating multiple times through the list and only failing when no more node types can be successfully registered.

In addition to the change to RepositoryNodeTypeManager, the bulk of the rest of the changes are new (manual) integration tests that are successful at replicating the problem. (Note that I was not able to replicate the problem when restarting the engine while in the same process - only when restarting ModeShape in a separate VM.)
All unit and integration tests pass, as does the new manual test.

I've finally replicated the problem and identified a fix. Normally when restarting the engine reads the node types from the system store, and these node types are usually in a specific order. Somehow, the node types are reordered so that the built-ins are not first in the list, and when registering these the built-ins (often "nt:unstructured" or "nt:base") are not able to be resolved. Fixing the ordering won't help with existing installations, so instead I chose to change RepositoryNodeTypeManager to be more tolerant of the order of the node types by simply iterating multiple times through the list and only failing when no more node types can be successfully registered.
In addition to the change to RepositoryNodeTypeManager, the bulk of the rest of the changes are new (manual) integration tests that are successful at replicating the problem. (Note that I was not able to replicate the problem when restarting the engine while in the same process - only when restarting ModeShape in a separate VM.)
All unit and integration tests pass, as does the new manual test.
@rhauch rhauch merged commit 2c12612 into ModeShape:master Jul 27, 2011
@rhauch
Copy link
Contributor Author

rhauch commented Jul 27, 2011

Merged into the 'master' and '2.5.x' branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant