Hello, I'm loading content through a JSON file. I would like then to sort nodes (mostly page nodes under document nodes) with the JCR API.
I'm calling my service in my bundle's activator, but i'm facing two issues. The first one is that no changes seems to be applied to the content tree. While my logs show that actions are executed (calls to Node.orderBefore() and then Session.save()), when I look at the tree with Composum, pages are still in a random order. Even though my parent node is an ordered folder (jcr:primaryType : sling:OrderedFolder). if I try to manually move a node in Composum, it works. There is no Exception thrown by my code. Am I missing something there? I used the JCR API to set permissions and had no such issue, changes were appliued. This operation is to be made only once, for migration purpose, and I would like it to be automatic each time this bundle is deployed to the server during development. For further ordering actions I will use the REST API. The second issue is that my service needs access to an administrative session for this ordering. I mapped it to the admin user with ServiceUserMapperImpl.amended in sling:OsgiConfig nodes, however this configuration is fired after the bundle has started. Which means that my service fails because no mapping is found at the time it's started, and I have to manually restart it to execute this code. Is there a possibility to fire this configuration before the bundle start? I've looked at priorities but didn't manage to make it work. Thank you, Guillaume
