AnsweredAssumed Answered

Spring ApplicationContext from outside Alfresco

Question asked by erennion on Nov 8, 2007
Hi everyone,

I'm trying to develop a portlet which accesses Alfresco so as to obtain some data.

Now I would like to obtain some Alfresco beans (ex: ServiceRegistry) in order to use them in my portlet, and I've read that this is achieved this way:

ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);

The problem is that in principle, I can't access that ApplicationContext (which is stored within the Alfresco webapp) from my portlet.

There's any way making Alfresco's spring context visible from outside webapps?

Thanks in advance

Outcomes