on 2019 Aug 12 8:09 AM
There is a requirement to identify whether the hybris server is completely started and then only enable the cronjobs by setting cronjob.timertask.loadonstartup=true (default is false). I tried to use the HybrisContextLoaderListener for this. I used the contextInitialized() method and put my logic there. However, it gets called while the server is starting up, and not when it is fully up.
Is there any way to identify this? Will reading the console log and checking the server startup message help?
Please suggest how this can be achieved.
Request clarification before answering.
Hi. You can use init method of some servlet for such purposes.
I had mainly the same task. Implement Spring listener that will be triggered on ContextRefreshedEvent and it will try to send request to your servlet. The last attempt will be successful and you will be able to execute code inside your init() method only once.
And if you don't mind, please, provide your solution if it's possible
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.