02-27-2015 02:06 AM
02-27-2015 04:10 AM
02-27-2015 05:55 AM
02-27-2015 06:36 AM
03-29-2018 06:53 AM
FYI, Putting the code inside a bootstrap patch (org.alfresco.repo.admin.patch.Patch) does not work.
For some reason, OptionalPatchApplicationCheckBootstrapBean, which is responsible for determining if patch was applied, is never called, hene returning always false, which in turn causes the message "he patch to add the indexes to support in-transactional metadata queries has not been applied" to be thrown. (Seems like a buggy behaviour in my opinion...)
Using a module component as mentionned by Emmanuel (with the executeOnceOnly option set to true) made it work.
03-31-2018 07:37 AM
The OptionalPatchApplicationCheckBootstrapBean is called, but only very, very late in the startup process when most (if not all) of Alfresco has already been initialised. This means it will be called way after patches have been executed, which is why they cannot rely on this class. Even module components cannot rely on this bean to have already been called, as they will be called as part of the "onBootstrap" event handling, and the ordering between module components / the patch check bootstrap is not guaranteed / may be dependent on operating system / file system / Spring file processing order. In practice though, the default file order should be sufficient to make module components works as long as no one overrides core Spring beans.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.