cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to identify if hybris server is completely started?

former_member625518
Discoverer
3,480

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.

View Entire Topic
0 Kudos

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