Running a daemon like service | Community
Skip to main content
TheBigRed
Level 4
December 21, 2016
Solved

Running a daemon like service

Hello trying to run a daemon like service on AEM. What is the best practice for this?

Use case is need to run a service that constantly watches a folder outside of AEM and pulls in content whenever it's uploaded to it.

Better to trigger this as an servlet or and OSGi service? Or can I implement this like a daemon somehow?

Thanks!!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
December 21, 2016

Service. You can also build a scheduler on it so it checks everyone often - this is the power of custom services - see this as an example of a scheduled service: 

http://scottsdigitalcommunity.blogspot.ca/2014/05/scheduling-adobe-experience-manager.html

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
December 21, 2016

Service. You can also build a scheduler on it so it checks everyone often - this is the power of custom services - see this as an example of a scheduled service: 

http://scottsdigitalcommunity.blogspot.ca/2014/05/scheduling-adobe-experience-manager.html

Translate
TheBigRed
TheBigRedAuthor
Level 4
December 21, 2016

Thank you Scott, what would be the best practice way of triggering this?

Service or Servlet?

Translate
smacdonald2008
Level 10
December 21, 2016

To implement this - you need to write a Java OSGi bundle. This is how AEM works - not using UNIX daemon services. 

You need to write the Java app logic - however - there are many online resources that will point you in the correct direction - ie: https://docs.oracle.com/javase/tutorial/essential/io/notification.html

Translate