08-20-2010 12:18 PM
protected static ApplicationContext ctx = FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance());
to get the proper context.
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");
08-24-2010 12:35 PM
08-25-2010 06:32 AM
08-25-2010 12:21 PM
package myPacket;
import javax.faces.context.FacesContext;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
public class AppContext implements ApplicationContextAware{
private static ApplicationContext ctx;
@Override
public void setApplicationContext(ApplicationContext arg0)
throws BeansException {
ctx = arg0;
}
public static ApplicationContext getApplicationContext(){
return ctx;
}
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.