cancel
Showing results for 
Search instead for 
Did you mean: 

Options seeing Alfresco repository from an external webapp

erennion
Champ in-the-making
Champ in-the-making
Hi everyone:

I've deployed Alfresco 2.0 and Liferay 4.2.1 (both in the same Tomcat instance), and I expect to show a list of stored documents in a portlet, so I need to access the Alfresco repository from Liferay.

I tried to retrieve the spring context bean manually (as it's explained in the Wiki's example), but it seems that Liferay cannot access Alfresco's context this way. So I need a different manner to connect both apps.

Now I consider te following ones (to tell the truth, I'm not sure if any of them is incorrect):

1º Try to put Alfresco's context as a cross-context (it can be checked in server.xml I think), and retrieve it from within the portlet next.

2º Access the repository via Alfresco JCR-RMI.

The point is that as I can see, in both solutions I have to perform some changes in the previous Alfresco / Liferay installation; and that's a little mess cause I had to make those changes in near 50 pcs.

So, does anybody know if there's any other way of accessing the repository, in which I only have to work within the portlet that I have to create? If not, which of the previous solutions do you recommend me?

Thanks in Advance:
                     Joaquín
2 REPLIES 2

derek
Star Contributor
Star Contributor
Hi,

The simplest will be to create your own service interface for the high-level functionality that you require.  The current HEAD code has a simple standalone application that calls Alfresco using RMI-exported services.

From the build environment, run ant -f continuous.xml distribute-bm-remote to build the application.  You can look at the target and the classes involved.  The services are exported by an extension config file bm-remote-loader-context.xml.sample.

The idea is simple.  You write a high-level service class that does the type of things your remote application needs and then export that service over RMI.  You'll need a service interface, an implementation class and a config file to Spring it all up.

Regards

kevinr
Star Contributor
Star Contributor
Another way would be to use WebScripts and access list of documents etc. via HTTP API (even thought it's the same server, that's fine).
http://wiki.alfresco.com/wiki/Web_Scripts

Kevin