// now create another context which depends only on the parent
ApplicationContext another = childContext;
// call method from child
Child anotherChild = (Child) another.getBean("child");
anotherChild.childMethod();
// shutdown the child context
childContext.close();
// should go back to what it was doing before