What Event should an @EventListener method listen to in order to execute after all context is built?

What Event should an @EventListener method listen to in order to execute right after all of Spring context has been initialized?

public void saveOneObject(SomeEventClass event) {
 ao.executeInTransaction(new TransactionCallback<MyObject>()
     public MyObject doInTransaction() {
     MyObject myObject = ao.create(MyObject.class);
     return myObject;

Not really part of the question, but for some context, I’m trying to initialize ActiveObjects db with some default values. Apparently, this can’t be done until all of Spring context has been initialized. https://ecosystem.atlassian.net/browse/AO-530

Wouldn’t upgrade task be a better fit for your use case?

Some additional links for this method:


I want to let you know that I circumvented the problem with a dirty fix. I added the Active Objects seeding procedure inside the init method of a filter, and I used the moduleMetaData().awaitInitialization() to make sure nothing started until the initialization was done.

Thanks for you tips and efforts to help me.