Hi,
The one that works is the one to use. When you create an ApplicationContext in Spring, it initializes all the beans again, thereby bringing up a second instance of the Alfresco repository within the same VM - bad.
And you can't just load a single xml file as a new ApplicationContext as it doesn't have access to all the other beans.
You have to get the context from the application - it should have pulled your custom xml files in.
Regards