
Originally Posted by
santyop
Hi logixplayer
thanks for ur reply
can please clarify me with the method DataAccessServiceFactory
whr is it called from.
thanks in advance
Ideally, I think it can be called from anywhere because you are using ClassPathXmlApplicationContext:
Code:
applicationContext = new ClassPathXmlApplicationContext("data-access-context.xml");
This is the definition of ClassPathXmlApplicationContext:
Code:
Standalone XML application context, taking the context definition files from the class path. Mainly useful for test harnesses, but also for application contexts embedded within JARs.
reference:http://static.springsource.org/sprin...onContext.html
It also states:
Code:
This is a simple, one-stop shop convenience ApplicationContext. Consider using the GenericApplicationContext class in combination with an XmlBeanDefinitionReader for more flexible context setup.
so to answer you question, it can be used anywhere. You will feed the ClassPathXmlApplicationContext your application context file on the classpath. For myself, I used this factory in the same project as was my my master application-context file (which other context files linked to).