AnsweredAssumed Answered

Alfresco Embedded

Question asked by army81 on Feb 17, 2011
I have a alfresco.war instance with tomcat 6.0.18, db postgres and I implement a web app but I need to get repository and serviceregistry from context of alfresco.war with a servlet in my web app :
public static ServiceRegistry getServiceRegistry() {
      if (serviceRegistry == null) {
         ServletContext alfrescoWebContext = servletContext
         WebApplicationContext alfrescoSpringContext = WebApplicationContextUtils
         serviceRegistry = (ServiceRegistry) alfrescoSpringContext
         repository = (RepositoryImpl) alfrescoSpringContext
      return serviceRegistry;
but the alfrescoWebContext is null. How I can take the context of alfresco.war?  It's possible to get the context of alfresco.war app?