My ApplicationContext has beans that are autowired as well as beans that are configured in application-Context.xml file. I want to know the sequence of bean initialization by spring.
I wanted to know this because: (I know this is a known and popular issue in stackoveflow..but could not get a solution!!) I have created SessionBean in application-Context.xml. Now tring to autowire this bean in DaoImpl file. sessionBean is showing null there. May be its sessionFactory is not initialised till then.
*I have tried using @DependsOn("SessionFactory") with failure.
So my questions are:
1)How to find the sequence of beans initialised by spring.
2)How do say to spring to initilise sessionfactory before initialising my DAOImpl class.
Please help as i am struck!!
Thanks in advance.
here is the answer of your 1st question-