cancel
Showing results for 
Search instead for 
Did you mean: 

Check that Alfresco is started

pcuvecle
Champ in-the-making
Champ in-the-making
Hi all,

I've created some custom beans into the Alfresco webapp where I have injected some Alfresco services (NodeService, ContentService…).

The problem I have is that my beans start up too early and try to use some Alfresco resources that are not available yet.

Is there a way to check that Alfresco is up and running ?
I thought about cheating by injecting the last loaded bean, so I can force Spring to load mine at the end. any suggestions ?

Thanks in advance for your help  Smiley Very Happy
1 REPLY 1

mruflin
Champ in-the-making
Champ in-the-making
Check the alfresco/WEB-INF/classes/alfresco/bootstrap-context.xml.

If you want to make sure that the bean's initialize method is called after all others from Alfresco, place the bean configuration file into /alfresco/extension (the config also includes bootstrap beans from /alfresco/extension/bootstrap, but those won't be loaded as very last)

Then simply do all work that require other services to be available in the listener method, not directly in the setters.

Hth, Michael