Nuxeo Java Code - Service versus Listener
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Dear Experts,
I have a requirement to write some Java code to pull data from an external system and use it to populate vocabularies and create/modify new documents in the system.
As I understand it I have two choices:
1. Create a Service component. Use "nuxeo boostrap service" to scaffold the service and write my Java code in it. How do I cause this service component to run on a periodic basis?
2. Create a listener component. Use "nuxeo bootstrap listener to scaffold the listener, write my Java code in it and then use Scheduler Service to fire an event that the Listener is listening to using the following:
https://doc.nuxeo.com/studio/scheduling-periodic-events/
Am I on the right track and are there pros and cons of choosing Service versus Listener? Why would I pick one versus the other? If there are examples of Service component, that would be very much appreciated !
Thank you,
SG
