Hi All,
Is it possible to get a JCR session from a standalone Java program for an AEM instance running in a cloud? We have a usecase where we need to manipulate properties of hundreds of assets under a folder tree based on the parent folder name (such as pdfs, photos) etc. I was thinking about writing a java program to recursively crawl down the folder and inspect various nodes under the main folder and manipulate it as needed. I can get the jcrsession running AEM SDK in local machine but I am skeptical that it will work for the AEM instance running in the cloud as I would not have access to /crx/server node.
Anyone has attempted to do this before? I would greatly appreciate any helpful pointers.
Thanks,
SKM_AEM
Solved! Go to Solution.
Views
Replies
Total Likes
No, JCR remoting is not possible with AEM CS.
Hi @skmAem ,
What you are trying to achieve can be done in 2 ways:
1. Write the code in Java and trigger it based on a servlet. This way you can push the code to cloud and then simply trigger the code on hit of the servlet, when you want to.
2. Write a groovy script, and run it in the groovy console. This would not need any code changes to be pushed. Although, you can push the script through code and then run it in the groovy console.
https://hashimkhan.in/aem-adobecq5-code-templates/groovy-script/
Hi @Anmol_Bhardwaj ,
Thanks for the reply. I will look into the servlet route as I am not familiar with Groovy. I wish there was a way to get a AEM/sling/jcr session from a standalone Java program for better debugging/tracing.
Thanks again!
-SKM
No, JCR remoting is not possible with AEM CS.
Views
Like
Replies