Hi all,
I have a scenario where I'm trying to access the Hybris application context from a class within my extension to then retrieve a bean and work on it.
The class where I try to access the application context is a Service class and at the moment of its initialization the init() method is invoked. This method contains within its body the instruction Registry.getSingletonGlobalApplicationContext(); that should return the ApplicationContext containing my bean.
Unfortunately even if the ApplicationContext object is returned, my bean is not there so i was wondering where it might be.
I am new to Hybris so I really don't know any other way to retrieve my bean considering that the other two methods from the class Registry to retrieve the application context return NULL so I'm basically stuck with the only method i mentioned above.
So, to summarize:
These two methods return NULL
Registry.getCoreApplicationContext()
Registry.getApplicationContext()
This method returns the ApplicationContext object but without my bean:
Registry.getSingletonGlobalApplicationContext();
Thanks in advance for any help of suggestion you'll be able to give me.
Cheers