« Zurück

Mounting Multiple CMIS Repositories on Liferay 6.1

Staff Blogs 25. Februar 2011 Von Alexander Chow Staff

Last year, there was a huge buzz about this new protocol call CMIS that just was released at 1.0.  Much like JCR, CMIS is a protocol that allows interoperability for document repositories of different systems (there is a good blog post about different use cases that can be found here).  The major advantage of CMIS over JCR is, well, it is not bound to Java.  So there are libraries for python, PHP, .NET, etc.  It also runs on top of standard web protocols like AtomPub or WebServices.

(The first section is just a bit of history.  So if you just want to know what's happening in version 6.1, skip the first section.)

The Famed CMISHook

So, in Liferay 6.0, I was tasked with allowing Liferay to hook into CMIS as a means to store its document library data.  If you have seen our JCRHook implementation, it is basically the same concept -- the CMISHook was used as a means to store our document library's low-level data.  But then, if you went to your CMIS Repository, you would have all these numbers show up in your system which make no sense whatsoever to the average user.  And if you changed anything in that repository, it would screw up Liferay because things were not synchronized.

Now WHY, some have asked, would you ever want something like this?  Doesn't this defeat the whole purpose of CMIS?  The answer to the second question is no.  The first question is much like asking why we have a JCRHook -- or an S3Hook, for that matter.  The main point is that, for some environments, you want to scale their systems in a way that a simple FileSystemHook will just not do.  It is like asking if you want to store your files on a thumbdrive, network drive or your new Thunderbolt hard disk.  This is what CMISHook did -- it gave users another option.

Liferay 6.1: Mounting CMIS Repositories

Of course, in Liferay, we were aware that the simple CMISHook was just a first step.  The next step was to completely redesign the Document Library to support multiple repositories mounted for each document library portlet.  Sergio in the Madrid office and I have been working on this redesign and now we can show a little of what it looks like.  On a Mac, this is akin to mounting my iDisk or a network drive to my Finder.  But the thing is, this is not simply CMIS -- the vision for 6.1 EE is to mount many vendor-specific repositories like Sharepoint and Documentum.  Instead of swapping my SATA drive with an SSD, you are given the option to put a SATA + SSD + FireWire.  So in 6.1, multiple repositories can be mounted to one document library -- CMIS is just the first of these.

While this is still relatively new and only in trunk, let me show you how it works.

Step 1: Credentials

The first thing you need to know is credentials.  In order to log into a CMIS repository, we need to basically pass the credentials you used in Liferay through to CMIS.  So, you need to make sure to set your portal.properties to allow Liferay to store your password in the session:

session.store.password=true 

Next, you need to make sure that the means in which you login to Liferay is the same as for your repository.  For most, this means that you need the same screenname.  So, in portal.properties, I have: 

company.security.auth.type=screenName

Of course, what this means is that if I log into, say Nuxeo using "alex" and "secretpassword", then I have to login to Liferay with those same credentials as well.  Most people would have some kind of an LDAP or something like this anyhow, so that should be fine.  Without the same credentials, obviously, you will have a principal exception and your users will be complaining to you about why they can't see their data.. you don't want that.

Step 2: Mounting Your Repository

OK, in the Document Library control panel, you will see an "Add Repository" action.  After clicking that, you will be given a form that looks like you are adding a folder -- but instead, you are adding a new repository.  (Incidentally, we made it so you can mount a repository in any folder in the Document Library -- the root level, or your sub-sub-subfolder.  As long as it is not in another third-party repository, you are fine.)

In this example, the repository type is set to CMIS AtomPub, but you can use WebServices if you like (it just has a whole lot more parameters to choose from).  For CMIS, you need to fill in all entries -- but the repositoryId is not required.  If you do not enter a repositoryId, then it will just look for the first repository using the given parameters and set it to that -- many systems only have one.

Step 3: Enjoy!

OK, after doing that, Liferay will try to talk to the other server and verify its connection.  Assuming everything goes well, a new repository is added to your list of folders.  Below, I have mounted the same Alfresco server -- once via AtomPub and again via Web Services.

Now, automatically, what you will notice is all the data that is stored at the Alfresco repository has been linked into Liferay.  Just to verify, you can look at the files and folders in Liferay and compare them to Alfresco.  Here's Liferay:

And here's Alfresco:

Obviously, any CRUD operation you do on Alfresco will be reflected on Liferay and vice versa.

CMIS Superstar?

For many, CMIS is perhaps the best thing since sliced bread.  And in fact, as an interoperability protocol, it is pretty darn good.  HOWEVER, all protocols come with shortcomings.  Remember, CMIS is quite new (it is only at 1.0 right now) and has a lot of room for growth.  A couple things to be aware of before you throw away that bread slicer you got for Christmas..

  • CMIS does not give vendor-neutral specifications for many features found in Liferay or other repositories... like workflow.  CMIS does not yet specify how a workflow is to be started and its different stages, etc.  This is something that is in the discussion for CMIS v2.0.  So, if you noticed, I mentioned Sharepoint and Documentum.. both of which are supposed to have support CMIS.  The reason why we are building out vendor-specific repositories for 6.1 EE is because CMIS does not solve all the woes of integrating legacy systems into Liferay.
  • Another fundamental item that is not supported by CMIS is a vendor-neutral way of managing metadata.  There is no adhoc metadata, tags/categories, etc.  Nuxeo, for example, stores their data as part of the CMIS file's properties using Dublic Core notation.  Alfresco, on the other hand, builds things in the "extended" space of CMIS properties and brings in their proprietary "aspects."  There are proposals out there for having a fundamental feature as metadata included in at least CMIS v1.1 (see here and here).  But as of today, this does not exist. We are hoping to build out some of these vendor-specific attributes ontop of CMIS, but there are so many vendors out there that have their own way of supporting the standard.  Just Nuxeo and Alfresco alone have quite different implementations.
  • Another thing you will notice is speed.. or the lack thereof.  If you are going to use everything on another server and have it translated into AtomPub or WebServices, over the wire to another server that has to translate it back to its native format... yah, it will get a performance hit.  I mean, within our code, I try to cache as much information as possible, but it is still noticeably slower on my system (of course, I am running multiple servers on my non-thunderbolt-equipped MacBook Pro).  It is like when I backup my wife's computer -- I always plug in and never do it over the WiFi.

Conclusion

All in all, CMIS is not a bad protocol.  In fact, it is an excellent protocol.  But, like all protocols, there is always a tension between the generic protocol and the genius of different vendors, trying to solve different problems for their customer's needs.

For us, we have gotten quite a few requests to support legacy repositories.  We have no problem with that.  In fact, that is the whole point of a portal – as an aggregator of information from vastly different technologies.  However, it required a complete overhaul of the backend to do it (the 6.1 document library API is VERY different.. but you can't tell, can you?).  Hence, the addition of CMIS as a separate repository in our document library, just adds to the greater ecosystem Liferay supports.  Customers like that.  And therefore, we do too.

Give her a spin and let me know how it goes.  Thanks for reading.

 

Antworten im Thread Autor Datum
cool! Thanks a lot, Alex. Jonas Yuan 25. Februar 2011 07:14
awesome! James Min 25. Februar 2011 08:26
Good Post Alex Ahmed Hasan 25. Februar 2011 11:59
Great news! It would be great to hear how the... Peter Monks 25. Februar 2011 15:43
Very nicely explained and I have to say its... Sandeep Nair 25. Februar 2011 21:06
@Peter The concerns I have raised in this post... Alexander Chow 26. Februar 2011 01:59
Oh I see. Thanks for the response. Sandeep Nair 26. Februar 2011 03:49
Thanks Alexander - does that mean Liferay is... Peter Monks 26. Februar 2011 12:25
Hi Alexander, The CMIS performance can... Florian Müller 27. Februar 2011 02:06
Great! Really killer feature of Liferay 6.1. Is... Alexey Kakunin 28. Februar 2011 00:23
@Peter I was part of it last year but there... Alexander Chow 28. Februar 2011 01:37
Hi Alexander ! It is not clear for me if we... Ivano Carrara 28. Februar 2011 10:19
Hi Ivano, I am not quite sure I understand... Alexander Chow 28. Februar 2011 10:55
Hi Alex, I wanted to give it a try, but it is... Jakub Liska 28. Februar 2011 14:49
I see, only LR 5.2.3 is supposed to work with... Jakub Liska 28. Februar 2011 17:51
Could you please guys take a look at the last... Jakub Liska 28. Februar 2011 19:26
Hi Alex, got error when adding repository (at... Jonas Yuan 28. Februar 2011 20:54
Hi Alex. I'm the development lead for IBM's... Jay Brown 28. Februar 2011 21:21
Hi Jay, Thanks. I want to test IBM CMIS P8,... Jonas Yuan 1. März 2011 06:08
@Jakub In general, Liferay has provided a... Alexander Chow 1. März 2011 02:52
Lots of thanks Alex. Really its a nice... Jignesh Vachhani 1. März 2011 05:01
Lots of thanks Alex. Really its a nice... Jignesh Vachhani 1. März 2011 05:02
Hi Alex, Awesome feature! Its nice to be able... Jamie L Sammons 1. März 2011 08:52
@Jamie Florian and I have had quite a few... Alexander Chow 3. März 2011 08:03
Yeah minimising the number of round trips is... Peter Monks 3. März 2011 09:10
@Alex It does seem faster. I'm also going to... Jamie L Sammons 3. März 2011 14:13
does anyone have experience with the... Hans-Joachim Kliemeck 12. Mai 2011 15:31
How will authentication to the external... Drew Blessing 12. Mai 2011 17:08
@Hajo @Drew Yeah the question of CAS (and other... Alexander Chow 13. Mai 2011 09:13
@Alexander I completely understand the struggle... Drew Blessing 16. Mai 2011 07:21
@alex, look at this:... Hans-Joachim Kliemeck 18. Mai 2011 10:10
@drew why don't you drop me an email. ... Alexander Chow 21. Mai 2011 20:17
@Alex, regarding managing metadata, custom... Jakub Liska 15. Juni 2011 08:28
@Jakub, yes I'm very much aware of that. Thanks! Alexander Chow 15. Juni 2011 09:16
[...] LOS ANGELES, CA – Liferay, provider of... Anonym 21. Juni 2011 20:01
@Alex, 3 months ago, I was about to implement... Jakub Liska 26. Juni 2011 14:19
I suppose that the reasons have "integration... Jakub Liska 26. Juni 2011 15:52
Hi Jakub, The only things that are really... Alexander Chow 27. Juni 2011 08:14
I'm referring to the synchronized IDs. I'm just... Jakub Liska 1. Juli 2011 04:03
[...] Liferay Improves Access to ECM Document... Anonym 3. August 2011 02:13
[...] Hi, I am new to Liferay. I downloaded and... Anonym 20. August 2011 09:51
[...] After banging my head against this... Anonym 6. September 2011 06:06
[...] Capability to manage different document... Anonym 7. September 2011 17:31
[...] Capability to manage different document... Anonym 8. September 2011 17:21
Hi Alex, I have tried to do the same But facing... Navin Agarwal 5. Dezember 2011 21:26
Thanks Navin. I'll track the ticket there. Alexander Chow 6. Dezember 2011 03:21
Hi Alex, I have one more issue , which also I... Navin Agarwal 6. Dezember 2011 03:39
[...] Montar múltiples repositorios – En la... Anonym 11. Januar 2012 01:57
[...] Hi, I want to mount the Alfresco... Anonym 16. März 2012 04:25
Hi Alex, are there any news about testing... Michael Kroh 27. März 2012 14:39
Hi Michael, I've worked with Jay Brown on... Alexander Chow 27. März 2012 16:46
[...] Multiple Repository Mounting. In the new... Anonym 29. März 2012 10:23
Dear all, interested if there is any... Natasa Bulatovic 11. April 2012 02:53
Hi Natasha, That's a great question. I don't... Alexander Chow 11. April 2012 03:55
[...] Liferay 6.1 brings with it the ability to... Anonym 11. April 2012 08:49
Hi Alex, I've successfully mounted an Alfresco... Denis Signoretto 31. Mai 2012 08:16
Hi Denis, Liferay 6.1 supports searching both... Alexander Chow 3. Juni 2012 15:59
[...] Pranay R Patadiya: Hi Friends, I am... Anonym 5. Juni 2012 08:56
Hi Alexander, thanks for your clarification.... Denis Signoretto 6. Juni 2012 09:17
Sounds good. In regards to your question, we... Alexander Chow 6. Juni 2012 09:25
@Alexander Thansk for your quick answer. By... Denis Signoretto 7. Juni 2012 02:40
The 1.0 spec does not really say much in terms... Alexander Chow 7. Juni 2012 03:06
Hi Alex, Thank you for this great... Alex Brown 22. Juli 2012 07:24
@Alex Brown It may be better to start a forum... Alexander Chow 23. Juli 2012 21:54
Is this possible with Liferay 6.05? Gus Mad 23. Juli 2012 23:34
@Gus, unfortunately not. In 6.0.x, we... Alexander Chow 23. Juli 2012 23:56
Hi Alexander, In your previously answer you... Denis Signoretto 7. August 2012 05:59
@Alex Brown Hi Alex, I have the same problem... Santiago Perez 11. September 2012 04:37
Is the hook working for WCM ? i.e can I migrate... Dipanjan Das 28. September 2012 22:31
@Denis, sorry, I missed your comment from... Alexander Chow 2. Oktober 2012 00:50
Hi Alexander , very nice blog. it helped me. I... Shikha Nirankari 20. Februar 2013 22:15
@Shikha, I'm not entirely sure I understand... Alexander Chow 21. Februar 2013 08:33

Gepostet am 25.02.11 07:14.
Great news! It would be great to hear how the demand for the CMISHook looks after this new functionality is released. Would you be willing to make a prediction, perhaps? ;-)

Also, is anyone from Liferay engaged with the CMIS OASIS technical committee? Most of the limitations of CMIS 1.0 raised in the post are well known to the TC and being considered for inclusion in future versions, but it would be great to also have client implementers (such as Liferay) engaged in the process to ensure the spec meets their needs.
Gepostet am 25.02.11 15:43.
Very nicely explained and I have to say its very innovative. One doubt i have is about permissions. Will the permissions be at liferay's end and the repository will just act to its name thats is storing documents or is it necessary to have permission in the repository to access the documents?
Gepostet am 25.02.11 21:06.
@Peter The concerns I have raised in this post are well known in OASIS. Actually, if you look at the links I posted, they all link to OASIS public documents.

@Sandeep The CMIS protocol specifies a set of permissions that, within Liferay, is translated over. All the permissions are managed from the third-party repository's end.
Gepostet am 26.02.11 01:59 als Antwort auf Sandeep Nair.
Gepostet am 26.02.11 03:49 als Antwort auf Alexander Chow.
Thanks Alexander - does that mean Liferay is indeed directly involved in the ongoing work of the OASIS CMIS TC?
Gepostet am 26.02.11 12:25 als Antwort auf Alexander Chow.
Hi Alexander,

The CMIS performance can actually be pretty good.

I think you are using OpenCMIS under the hood. Reuse the Session object as much as you can. It does a lot of caching for you and tries to avoid unnecessary calls to the repository. Especially, the AtomPub binding benefits from it. OpenCMIS is thread-safe. It's no problem to share the Session or other CMIS objects across threads.
Also, only fetch the properties you really need. Some repositories send lot of properties by default, which bloat the messages and reduce the performance. Some CMIS properties have to be calculated on the repository side, which can take time. If you filter them out with an OpenCMIS OperationContext, you gain performance.
Have a look at the CMIS Workbench that is part of OpenCMIS. There is no noticeable delay when you navigate through the folder hierarchy.
Gepostet am 27.02.11 02:06.
Great! Really killer feature of Liferay 6.1.
Is it already in svn trunk? Is it possible to play with it?
Gepostet am 28.02.11 00:23.
@Peter I was part of it last year but there were some changes on our status that I'm not too clear on.

@Alexey Definitely. Give her a try and let me know what you think. You can email me directly if you like: alexander.chow { at } liferay.com.

@Florian Good to hear from you and your thoughts on performance. I am very much aware that running things via the workbench can be quite snappy. If you like, we can have more of a technical discussion offline (not sure if this is the best forum for clarifying technical problems) -- feel free to email me.

Briefly, for the OperationContext, though this is true, the bulk of the properties are needed. I mean, fundamentally, to the end user, we are trying to portray the third-party repository to look and feel like a Liferay repository that has many properties stored in the database and other things in the filesystem or something like that. So, there is not much filtering that can occur.

In regards to the reuse of sessions, the difficulty comes when we have a multi-user environment (as compared to the workbench). Each session must be configured different for each user. So, if you have 100 logged in users, you need to keep that many sessions opened, with their respective caches. When things are managed all within Liferay's own repository, we have the ability to cache based on the roles of the users which, obviously, shrinks the number of individual caches stored. And when we load a page, we load not only the contents of a folder, but also statistics for its subfolders and sub-subfolder listing and other such things -- none of which are retrieved when we are using the workbench. Instead, we now require multiple queries to address this across the wire.

There are undoubtedly areas which we can improve on our end. Maybe we can configure it so a lot of these extra statistics and random information can be removed. But, at present, that is the current experience our users are used to without the same speed hit.

Anyhow, as I said, if you would like to discuss this further, drop me an email or maybe we can arrange a call.
Gepostet am 28.02.11 01:37.
Hi Alexander !

It is not clear for me if we can configure multiple DL portlets instance with each instance pointing (for example) to a separate Alfresco servers...

In fact, in a possible scenario, we can aggregate in a single portal the contents contained in various Alfresco servers, of course instantiating the same quantity of DL portlets, each one in a different community...

Thank you for your carification !

Ivano C.
Gepostet am 28.02.11 10:19 als Antwort auf Alexander Chow.
Hi Ivano,

I am not quite sure I understand your question. But ultimately, in one DL portlet, you can point to multiple servers -- each mounted as a separate repository. In my example above I simulate having two Alfresco servers (one via CMIS AtomPub and another via CMIS Web Services) mounted to the same DL portlet.

Hope that clarifies things!

Alex
Gepostet am 28.02.11 10:55 als Antwort auf Ivano Carrara.
Hi Alex,

I wanted to give it a try, but it is impossible to even connect from liferay via alfresco share http://issues.liferay.com/browse/LPS-15543 ... I spent half a day on this issue. I simply can't figure that out.... whatever I tried I ended up with this error...

I'd really appreciate if you could take a look at it... I feel hopeless

http://issues.alfresco.com/jira/browse/ALF-7423
Gepostet am 28.02.11 14:49 als Antwort auf Alexander Chow.
I see, only LR 5.2.3 is supposed to work with Alfresco share ... I could spare half a day then :-)
Gepostet am 28.02.11 17:51 als Antwort auf Alexander Chow.
Could you please guys take a look at the last comments ? http://www.liferay.com/community/forums/-/message_boards/message/7703791

It is a relevant issue to this one.
Gepostet am 28.02.11 19:26 als Antwort auf Alexander Chow.
Hi Alex, got error when adding repository (at revision 74180, created account admin/admin with role Administrator, and log in as admin/admin).

04:46:03,851 ERROR [RepositoryServiceImpl:305] com.liferay.portal.security.auth.PrincipalException: org.apache.chemistry
.opencmis.commons.exceptions.CmisRuntimeException: Unauthorized
com.liferay.portal.security.auth.PrincipalException: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeExcepti
on: Unauthorized
at com.liferay.portal.repository.cmis.CMISRepository.processException(CMISRepositor­y.java:1408)
at com.liferay.portal.repository.cmis.CMISRepository.initRepository(CMISRepository.­java:619)
at com.liferay.portal.service.impl.RepositoryServiceImpl.createRepositoryImpl(Repos­itoryServiceImpl.java:415)
at com.liferay.portal.service.impl.RepositoryServiceImpl.mountRepository(Repository­ServiceImpl.java:302)
Gepostet am 28.02.11 20:54 als Antwort auf Alexander Chow.
Hi Alex. I'm the development lead for IBM's CMIS servers. Would you be interested in doing some interoperability testing if I could give you access to a test IBM CMIS P8 cloud system. I'm just looking for you to point your client at my public server and see if there are any compatibility issues. We do this with a lot of CMIS client vendors (e.g. Apache Chemistry ) and we have found that is makes both clients and implementers better. Sometimes we even end up tightening up the spec as a result of gray areas that we uncover.

Looking forward to hearing from you. You will find my correct email address in your database under this account.

Thanks in advance,

Jay Brown
IBM
Gepostet am 28.02.11 21:21.
@Jakub In general, Liferay has provided a CMISHook since 6.0 and, in the upcoming 6.1 (not yet released), we provide mounting of multiple repositories -- CMIS being one of them via CMISRepository. I'll respond more in your message board post.

@Jonas From the looks of your exception, it looks like you have an authentication exception on the Alfresco end. Did you check their logs? Also, make sure you can hook into it using the CMIS workbench (http://incubator.apache.org/chemistry/cmis-workbench.html). If you can't there, you definitely won't be able to via Liferay.

@Jay That would be brilliant! P8 is what of the repositories I am tasked with testing against so that is exactly what I would need. Drop me an email -- alexander.chow { at } liferay.com.
Gepostet am 01.03.11 02:52.
Lots of thanks Alex.
Really its a nice enhancement !!!
Gepostet am 01.03.11 05:01.
Lots of thanks Alex.
Really its a nice enhancement !!!
Gepostet am 01.03.11 05:02.
Hi Jay, Thanks. I want to test IBM CMIS P8, too. In LR 6.1, OpenCMIS Apache Chemistry should get supported 100%.

Eventually it would be nice that the CMIS of Day Software, Dennis Hamilton, EMC, FatWire, Microsoft, Open Text,
Oracle, and SAP could be tested in details in Liferay 6.1.
Gepostet am 01.03.11 06:08 als Antwort auf Jay Brown.
Hi Alex,

Awesome feature! Its nice to be able to give end users the consistent look and feel of Liferay with a powerful backend repository like Alfresco.

However I am noticing the performance hit that you mentioned quite a bit. I have Alfresco running on a pretty hefty dedicated system and it still takes 5 to 10 seconds for files and folders to show up. The Alfresco process is pretty pegged whenever Liferay is pulling up files and folders. Hopefully some of the things Florian mentioned can help with this.

Thanks,
Jamie
Gepostet am 01.03.11 08:52.
@Jamie Florian and I have had quite a few emails about improving the performance. I have taken a few steps at boosting the performance which you should be able to see as of rev 74447. No matter what, the first time a logged in user accesses a given folder, it will take a little bit to load for the data to be cached.

I can't comment on how well Alfresco performs because I don't use Alfresco on a regular basis. But now, I have minimised the number of calls I am making over the wire so it may improve for you.

Let me know how things go.

Alex
Gepostet am 03.03.11 08:03 als Antwort auf Jamie L Sammons.
Yeah minimising the number of round trips is the #1 priority from a performance perspective. If a single call is found to be slow then the usual Alfresco performance tuning and analysis process can be followed (a service Alfresco provides, fwiw).
Gepostet am 03.03.11 09:10 als Antwort auf Alexander Chow.
@Alex It does seem faster. I'm also going to try upgrading the Alfresco side to Alfresco Enterprise 3.5 since its still at 3.3.

@Peter I was thinking about opening a ticket with Alfresco to see if I could get some basic tuning parameters as well.
Gepostet am 03.03.11 14:13 als Antwort auf Peter Monks.
does anyone have experience with the combination of Liferay 6.1, Alfresco, CMIS and CAS? i think it is not possible because the password has to be saved... any ideas?
Gepostet am 12.05.11 15:31.
How will authentication to the external repository work if we use SSO, like CAS, with the portal? In this case the portal never gets to see the password, so cannot store it to send on to the repository.

The only thing I can think of is that somehow the external repository will forward the request to the CAS server and receive an auth ticket behind the scenes. This is a clear shot in the dark!

Other than this, I am very excited about this support and cannot wait to try it out!
Gepostet am 12.05.11 17:08.
@Hajo @Drew Yeah the question of CAS (and other SSO systems) is something that is in the back of my mind. The question really is whether we can either (1) use the ticket used to log into the portal or (2) create a proxy ticket to log into the third-party repository, probably the latter. Or, to put it another way, it is a question of whether the third-party repository supports CAS (proxy)tickets via CMIS... and I can throw in the hook for that (should be relatively simple, if it does).

I have tried exploring this with Alfresco, but haven't gotten too far... mainly because I don't know too much about how to get CAS running on Alfresco (not an Alfresco expert here) and my contact in Alfresco wasn't too clear on how CAS works with CMIS either. I also have been a bit strapped with some other work so haven't really been able to research this too much.

@Peter @Florian Any thoughts on this one?
Gepostet am 13.05.11 09:13 als Antwort auf Drew Blessing.
@Alexander I completely understand the struggle with Alfresco CAS. The documentation are not very helpful, and neither are their engineers on the forums. I have been able to get Alfresco CASified, though. I would be willing to provide my documentation if you're interested. I am fairly certain that CASifying Alfresco also puts all web service URLs behind CAS as well. Although it's wishful thinking I am hoping that if both Alfresco and Liferay are CASified and the user is already authenticated, attempting to access Alfresco via CMIS will automatically trigger a CAS ticket request and push through on it's own. I haven't had a chance to test this yet, but plan to soon. Thanks for your work. It's really going to be slick!
Gepostet am 16.05.11 07:21 als Antwort auf Alexander Chow.
@alex, look at this: http://issues.alfresco.com/jira/browse/ALF-7074

if you are willing to modify your cmishook, you should create a seperate alfresco-cmishook!
Gepostet am 18.05.11 10:10 als Antwort auf Drew Blessing.
@drew why don't you drop me an email. alexander.chow { at } liferay.com

@hajo thanks for the link. Will need to explore this further. Not sure if that is a CAS ticket or an Alfresco ticket. But I think we can probably create a generic authentication utility that Liferay can use to login to not only Alfresco but any other system.
Gepostet am 21.05.11 20:17 als Antwort auf Hajo Kliemeck.
@Alex, regarding managing metadata, custom types / JCR mixins, it is called "Secondary types" and it seems to be in development

http://tools.oasis-open.org/issues/browse/CMIS-713
Gepostet am 15.06.11 08:28 als Antwort auf Alexander Chow.
@Jakub, yes I'm very much aware of that. Thanks!
Gepostet am 15.06.11 09:16 als Antwort auf Jakub Liska.
[...] LOS ANGELES, CA – Liferay, provider of the world’s leading enterprise-class open source portal, today announced its plans to further improve ease of integration with third-party ECM document... [...] Read More
Gepostet am 21.06.11 20:01.
@Alex, 3 months ago, I was about to implement BaseRepositoryImpl so that I would mount a custom JCR repository to DL, via this implementation. I said to myself that I better wait until it stabilizes or some documentation shows up.

In regard to BaseRepositoryImpl / BaseLocalRepositoryImpl :

Is it so, that CMISRepository doesn't implement the local interface, because ACL is handled on the repository side ?
So that if the third party repository hadn't its own authentication / authorization mechanism, it would implement both interfaces and the remote one would be a permission checking wrapper for the local one, right ?

In regard to sync of a 3rd party repository with RepositoryEntry, the idea is (in CMISRepository impl) having all documents synchronized, right ? It can be seen in CMISRepository.cacheFoldersAndFileEntries(); You mentioned that in this blog post. But shouldn't CMIS be only a mounting point ? I don't see a reason for keeping state of remote repository in RepositoryEntry table. Whatever CRUD I do, I want it to be reflected only in the remote repository, imho. What is the idea behind the synchronization ?

Not only CMIS repository, but even a custom JCR repository should be only "mounted" to DL. Why would one need to keep track of documentIDs ?
Gepostet am 26.06.11 14:19 als Antwort auf .
I suppose that the reasons have "integration nature", because DL uses DLAppService and it operates with FileEntries, so that addFileEntry() method of a third part repository must return FileEntry and there must be some tracking between FileEntry table and third party repository. For instance, right after file is added via DL, it is added to AssetPublisher.

I believe that a lot of LR developers would actually need to employ DL only as UI for their custom repositories. If you google around, you see that in most cases, people think about using their document store in LR. They've got a document store and they are searching for a portal to wrap it with.

Considering that hooks are meant only for scaling purposes. When used with LiferayRepository, the store must be empty, to be in sync with FileEntries. They can be used directly though (not necessarily via LiferayRepository).

It isn't clear to me, what third party repositories that implement BaseRepositoryImpl are meant for. Because it is very hard to think about the conflicts that may arise when you make changes into the third party repository not only via BaseRepositoryImpl implementation but even by some other means. It practically excludes the possibility to use DL as a user interface for custom document stores, which I think is what people would like to see. Though it is hard to imagine something like this if the state in the document store and FileEntry table is to be synchronized, no matter how perfect would the implementation be.
Gepostet am 26.06.11 15:52 als Antwort auf Jakub Liska.
Hi Jakub,

The only things that are really synchronized are IDs. The cache you refer to is just for a quick lookup that gets reset for ever HttpRequest. This is because each HttpRequest may access the same files or folder multiple times and we want to minimize excessive calls within a few milliseconds. Hence, there should not really be too much of a conflict between CRUD operations in Liferay vs. the third party repository.

Hope that clarifies things.

Alex
Gepostet am 27.06.11 08:14 als Antwort auf Jakub Liska.
I'm referring to the synchronized IDs. I'm just saying that for the sake of LR , DL might offer the possibility of being UI for repositories... So that creation of FileEntry could theoretically be part of Repository implementation. That way, DL could be used as UI for third party repositories without any possible sync issues when creating new files. I know it is practically Utopia, because DL is built on FileEntries, it's not built for JCR stores... But I can't even figure what happens if a file is removed from repository (not via DL), but DL already got it's ID :-)

The tight integration can be also seen for instance here : EditFileEntryAction.updateFileEntry() method has :

AssetPublisherUtil.addAndStoreSelection(
actionRequest, DLFileEntry.class.getName(),
fileEntry.getFileEntryId(), -1);

Shouldn't this be part of the Repository implementation ? If I use my custom repository, it should decide itself about AssetPublishing right ?

I'm just trying to point this out, because for past years, as I said, I've seen many people asking about how to utilize Liferay for their existing document stores. Imho DL now is not enough transparent for doing this.
Gepostet am 01.07.11 04:03 als Antwort auf Alexander Chow.
[...] Liferay Improves Access to ECM Document Repositories with CMIS 1.0 Compatibility LOS ANGELES--(BUSINESS WIRE)--Liferay, provider of the world’s leading enterprise-class open source portal, today... [...] Read More
Gepostet am 03.08.11 02:13.
[...] Hi, I am new to Liferay. I downloaded and deployed Liferay 6.1 from trunk. Then I tested the new integration features with Alfresco CMIS. In the Document Library I have added the repository via... [...] Read More
Gepostet am 20.08.11 09:51.
[...] After banging my head against this problem for a few days I turning to the Liferay community for some suggestions. I'm trying to configure an instance of Sharepoint 2010 to serve as a CMIS repository... [...] Read More
Gepostet am 06.09.11 06:06.
[...] Capability to manage different document types: basic document, image (Image Gallery is merged into Document Library), video, audio, etc. Providing Dynamic Data List (DDL) and Dynamic Data Mapping... [...] Read More
Gepostet am 07.09.11 17:31.
[...] Capability to manage different document types: basic document, image (Image Gallery is merged into Document Library), video, audio, etc. Providing Dynamic Data List (DDL) and Dynamic Data Mapping... [...] Read More
Gepostet am 08.09.11 17:21.
Hi Alex,
I have tried to do the same But facing some issues with the Visibility of the file. I have raised the issue in the http://issues.liferay.com/browse/LPS-23408.
Please help me to fix the issue.

Thanks in advance.
Gepostet am 05.12.11 21:26.
Thanks Navin. I'll track the ticket there.
Gepostet am 06.12.11 03:21 als Antwort auf Navin Agarwal.
Hi Alex,

I have one more issue , which also I have raised . http://issues.liferay.com/browse/LPS-23407
Gepostet am 06.12.11 03:39 als Antwort auf Alexander Chow.
[...] Montar múltiples repositorios – En la nueva Biblioteca de documentos y multimedia, podrás montar múltiples repositorios (mediante el protocolo CMIS) y desarrollar conectores a medida que enlacen con... [...] Read More
Gepostet am 11.01.12 01:57.
[...] Hi, I want to mount the Alfresco repository to Liferay repository using Liferay's latest feature of mounting multiple CMIS repositories. I am following this blog. But I am not sure how to get the... [...] Read More
Gepostet am 16.03.12 04:25.
Hi Alex,
are there any news about testing against IBM's CMIS servers?

We have here inhouse a IBM CMIS Server and I'm not able to connect against that Server
AtomPub:
01:16:15,669 DEBUG [FullNameValidatorFactory:46] Return com.liferay.portal.security.auth.DefaultFullNameGenerator
01:16:15,671 WARN [DLFileEntryPersistenceImpl:5544] No DLFileEntry exists with the key {groupId=19, folderId=0, title=IBM}
01:16:15,751 WARN [RepositoryLocalServiceImpl:95] Unable to initialize CMIS session for repository with {repositoryId=10569}
01:16:15,752 DEBUG [InvokerPortletImpl:370] processAction for 20 takes 89 ms
01:16:15,753 DEBUG [InvokerFilterChain:113] Skip disabled filter class com.liferay.portal.servlet.filters.servletcontextinclude.ServletContextIncludeFi­lter

WebServices
01:22:42,188 DEBUG [FullNameValidatorFactory:46] Return com.liferay.portal.security.auth.DefaultFullNameGenerator
01:22:42,189 WARN [DLFileEntryPersistenceImpl:5544] No DLFileEntry exists with the key {groupId=19, folderId=0, title=ibm}
01:22:42,200 WARN [RepositoryLocalServiceImpl:95] org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot initalize Web Services service object [org.apache.chemistry.opencmis.binding.webservices.RepositoryService]: 2 counts of InaccessibleWSDLException.

01:22:42,202 DEBUG [InvokerPortletImpl:370] processAction for 20 takes 22 ms

It seem's to me that I'm doing some principal error ?
Thanks
Michael
Gepostet am 27.03.12 14:39 als Antwort auf .
Hi Michael,

I've worked with Jay Brown on IBM's P8 server in the past and have been able to get it to work. However, IBM has quite a few servers that have various levels of CMIS support. You may want to try using the CMIS workbench (http://chemistry.apache.org/java/developing/tools/dev-tools-workbench.html) against your server and perhaps even running the built-in TCK to make sure it works first. If it is a principal error, Liferay should be returning that.

Also, the forums are perhaps a better forum to discuss problems you may be having than on my blog. It widens the discussion to input from others.

Alex
Gepostet am 27.03.12 16:46 als Antwort auf Michael Kroh.
[...] Multiple Repository Mounting. In the new Documents and Media app, you can now mount multiple repositories (e.g. through CMIS) and develop custom connectors to link to existing CMS repositories. ... [...] Read More
Gepostet am 29.03.12 10:23.
Dear all,


interested if there is any possibility/plans to add a SVN repository of choice via LR document library?
Gepostet am 11.04.12 02:53 als Antwort auf .
Hi Natasha,

That's a great question. I don't think that is part of our use case but it is surely a very conceivable one. The framework, however, was built so one can fairly easily build a plugin. Somebody in the community has already done one for te file system.

Alex
Gepostet am 11.04.12 03:55 als Antwort auf Natasa Bulatovic.
[...] Liferay 6.1 brings with it the ability to mount multiple content repositories (e.g. CMIS, Documentum, Sharepoint, etc). And now Tomas brings the ability to mount OS filesystems! Yes, this means you... [...] Read More
Gepostet am 11.04.12 08:49.
Hi Alex,

I've successfully mounted an Alfresco 4.0 repository throuth CMIS Atom Pub Service. I can browse folders and files in Document and Media Portlet. I was aspecting that searches could retrurn hits both from local (Liferay) and remote (Alfresco/CMIS) repository but actually only local files are founded.

The question is, what about search cabability mounting a remote CMIS repository in Liferay Document and Media Portlet?

Thanks,
Denis.
Gepostet am 31.05.12 08:16.
Hi Denis,

Liferay 6.1 supports searching both local and remote repositories. The search capabilities, however, are limited to the facilities that is provided by the protocol (in this case CMIS).

So, for instance, if you can put a file named "Liferay 6.1.pdf" in both the local and remote repositories and see the differences in the searches. If you search for "Liferay", both should show up (I just tested it). If you are curious, the search is mainly done in the class BaseCmisSearchQueryBuilder.

There is a significant difference between 6.1 CE and EE where we overlooked performing a content search (searching against the actual file being uploaded as opposed to simply a name search). This was fixed just after CE was cut so did not make it until 6.1 EE unfortunately (see http://issues.liferay.com/browse/LPS-25066).

Hope that helps.

Alex
Gepostet am 03.06.12 15:59 als Antwort auf Denis Signoretto.
[...] Pranay R Patadiya: Hi Friends, I am trying to add Alfresco Repository through CMIS as shown. I am following: 1) Add Repository 2) Add Name of Repo 3) Add Desc 4)Select CMIS Repositroy(Atompub) from... [...] Read More
Gepostet am 05.06.12 08:56.
Hi Alexander,

thanks for your clarification. I'm doing some more test on my environment.

One more question. Liferay whole repository can be accessed through CMIS ?
(e.g. using an application that uses CMIS to access Liferay contents).

WDYT ?

Thanks,
Denis.
Gepostet am 06.06.12 09:17 als Antwort auf .
Sounds good.

In regards to your question, we do have a ticket out there for Liferay to be exposed as a CMIS repository (http://issues.liferay.com/browse/LPS-10201). At the moment, this is in our backlog since other matters have trumped that in terms of priority.

Alex
Gepostet am 06.06.12 09:25 als Antwort auf Denis Signoretto.
@Alexander

Thansk for your quick answer.

By the way, as reported here (http://www.liferay.com/community/wiki/-/wiki/Main/CMIS+Repository#section-CMIS+­Repository-FAQ) mounting CMIS repository require to store user password in session.

It's a limit of CMIS itself or (in particular with Alfresco) is there a workaround that allow CMIS repository working wiht a SSO ?

Thanks,
Denis.
Gepostet am 07.06.12 02:40.
The 1.0 spec does not really say much in terms of authentication, so most systems support Basic or Digest only. Alfresco has their own proprietary SSO that we do not support.
Gepostet am 07.06.12 03:06 als Antwort auf Denis Signoretto.
Hi Alex,

Thank you for this great functionality. I've been able to successfully added both Alfresco 3.4 and 4.0 repositories. However, when trying to add a document to a repository via Liferay it works for a while but eventually, I'm presented with a blank popup window with the title, "Select Document Type." Also, the catalina.out logs shows the following error. Are you able to help me resolve this issue?

14:09:05,406 ERROR [IncludeTag:426] Current URL /home?p_p_id=110_INSTANCE_kQ9Su4mrEWYo&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode­=view&p_p_col_id=column-2&p_p_col_pos=1&p_p_col_count=3&_110_INSTANCE_kQ9Su4mrEW­Yo_struts_action=/document_library_display/select_file_entry_type&_110_INSTANCE_­kQ9Su4mrEWYo_redirect=http://portal.opensourceinnovations.com:8585/home?p_p_id=1­10_INSTANCE_kQ9Su4mrEWYo&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_­id=column-2&p_p_col_pos=1&p_p_col_count=3&_110_INSTANCE_kQ9Su4mrEWYo_backURL=htt­p://portal.opensourceinnovations.com:8585/home?p_p_id=110_INSTANCE_kQ9Su4mrEWYo&­p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_pos=1­&p_p_col_count=3&_110_INSTANCE_kQ9Su4mrEWYo_repositoryId=10649&_110_INSTANCE_kQ9­Su4mrEWYo_folderId=10683 generates exception: com.liferay.portlet.documentlibrary.NoSuchFolderException: No DLFolder exists with the primary key 10683
14:09:05,430 ERROR [IncludeTag:154] com.liferay.portlet.documentlibrary.NoSuchFolderException: No DLFolder exists with the primary key 10683
at com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistenceImpl.­findByPrimaryKey(DLFolderPersistenceImpl.java:782)
at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl­.getFileEntryTypesPrimaryFolderId(DLFileEntryTypeLocalServiceImpl.java:465)
at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryTypeLocalServiceImpl­.getFolderFileEntryTypes(DLFileEntryTypeLocalServiceImpl.java:219)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMet­hodInvocation.java:112)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionI­nterceptor.java:71)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMet­hodInvocation.java:108)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice­.java:59)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMet­hodInvocation.java:108)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice­.java:59)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMet­hodInvocation.java:108)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.jav­a:211)
at com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalServiceUtil.getF­olderFileEntryTypes(DLFileEntryTypeLocalServiceUtil.java:354)
at org.apache.jsp.html.portlet.document_005flibrary_005fdisplay.select_005ffile_005­fentry_005ftype_jsp._jspService(select_005ffile_005fentry_005ftype_jsp.java:682)­
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at com.liferay.portal.kernel.servlet.DirectRequestDispatcher.include(DirectRequestD­ispatcher.java:45)
at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:323)
at com.liferay.taglib.util.IncludeTag._doInclude(IncludeTag.java:418)
at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)
at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3139)­
Gepostet am 22.07.12 07:24.
@Alex Brown

It may be better to start a forum post at http://forums.liferay.com with more details (specific version of Liferay and Alfresco, etc.). It may be easier to troubleshoot there than in the comments here.

Incidentally, I was just able to upload a few files without any problems and not have any exception like the above.
Gepostet am 23.07.12 21:54 als Antwort auf Alex Brown.
Gepostet am 23.07.12 23:34.
@Gus, unfortunately not. In 6.0.x, we introduced the CMISHook (which is discussed in this blog post) but it is not the same as mounting an entire CMIS repository which is a new feature since the release of 6.1.
Gepostet am 23.07.12 23:56 als Antwort auf Gus Mad.
Hi Alexander,

In your previously answer you wrote:

"There is a significant difference between 6.1 CE and EE where we overlooked
performing a content search (searching against the actual file being uploaded as opposed to simply a name search). This was fixed just after CE was cut so did not make it until 6.1 EE unfortunately (see http://issues.liferay.com/browse/LPS-25066)."

Can you tell me if in recently released 6.1.1 GA2 the issue LPS-25066 has been resolved?

Thanks,
Denis.
Gepostet am 07.08.12 05:59 als Antwort auf Alexander Chow.
@Alex Brown

Hi Alex,
I have the same problem when I'm uploading a document: "No DLFolder exists with the primary key XXXX".
Did you find a solution?

Thanks,
Santiago
Gepostet am 11.09.12 04:37 als Antwort auf Denis Signoretto.
Is the hook working for WCM ? i.e can I migrate a web site content (e.g. .html files) into liferay WCM ?
Gepostet am 28.09.12 22:31 als Antwort auf Santiago Perez.
@Denis, sorry, I missed your comment from earlier. No, it doesn't seem like 6.1.1 GA2 includes the fix from LPS-25066.

@Mac D, the mounting of repositories is not directly related to WCM. If you check the forums, there are a number of ways people have used to serve a legacy static website through Liferay. However, the mounting of repositories has little bearing on that.
Gepostet am 02.10.12 00:50 als Antwort auf Mac D.
Hi Alexander ,
very nice blog. it helped me. I ahve stucked on a point:
I did this integration through admion user in both and I have a user named abc in both alfresco and liferay but this integration is not visible in abc account in liferay for a site. how this can be achived??
Gepostet am 20.02.13 22:15.
@Shikha, I'm not entirely sure I understand your question. If both the users "admin" and "abc" are available on Alfresco and Liferay and both have the correct passwords, and both have access to the same site that has the Alfresco repository mounted, then both should be able to see the repository. If I understand your question correctly, are you saying that the user "abc" does not have access to the same site? If so, you need to add him via the control panel for sites.
Gepostet am 21.02.13 08:33 als Antwort auf Shikha Nirankari.