AnsweredAssumed Answered

Getting Application Context from a webservice

Question asked by p3d3r0s0 on Aug 20, 2010
Latest reply on Aug 25, 2010 by p3d3r0s0
Hey, im using the kofax plugin Ascent, and i need to add a property to a node inside DbNodeServiceImpl. That property is stored in my database. But to access tables in the database i was using this
   protected static ApplicationContext ctx = FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance());
to get the proper context.
Unfortunatly, i cant get the ApplicationContext that way when i use the plugin, i also tried:

   protected static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
   protected static ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");
   protected static ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:alfresco/jcr-context.xml");
   protected static ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath*:alfresco/hibernate-context.xml");

Am i going for the wrong approach?