You need to manually copy the contents from one location to another, and then remove the original. This is quite simple to do, but there are some assumptions that have to be made. If we were to do implement "move", then most app developers would be unaware of those assumptions.
For example, connectors are not XA resources, so "move" cannot be implemented in a transactionally safe way. Of course, most applications won't need it to be, but client developers that implement simple copy-and-delete logic will now be aware of this.
Secondly, it's easy to "move" an ancestor of a tree, but if that tree contains large amounts of information (including very large binary values) then ModeShape's move implementation would take a substantial amount of time. When app developers are responsible for the logic, they have to think about what they're doing.
UPDATE: See MODE-1977 for what does and does not work when moving federated nodes.
I applied copy-and-delete logic to the implementation.
This idea worked for external-to-external as expected. In other words, copying binary file from one external resource A to another external resource B and delete node from external resource A worked perfectly.
However, copy-and-delete logic does not work for internal-to-external. Copy of binary file from internal resources to external resource is unproblematic but delete node and its children from internal node is still problem since deleted node and its children are remained in its original path.
Although I have configured
garbageCollection withCLI command
/subsystem=modeshape/repository=sample:write-attribute(name=garbage-collection-interval,value="1"), it seems that it does not work.
How can I handle this problem?
Any help is appreciated!