cancel
Showing results for 
Search instead for 
Did you mean: 

JCR vs. JCR-RMI

carnby
Champ in-the-making
Champ in-the-making
I've read the wiki and forums, but it's still a little unclear to me when RMI is required to access the repository…
We are planning on using Liferay portal in combination with Alfresco CMS. If they are both running on the same Tomcat / JBoss server, do the liferay portlets have to connect to the repository through JCR-RMI or can they communicate directly with the JCR?

If anyone out there is using the Liferay/Alfresco combination I'd be interested in hearing how you went about it…

Thanks
14 REPLIES 14

rdanner
Champ in-the-making
Champ in-the-making
Hi,

Good to know that you can use either JCR or JCR-RMI. Now can anyone tell me how not to use RMI and not to try to connect to that port?

My JCR application worked fine with alfresco 2.0, now under 2.1 , it is trying to bind to 50500 and giving an error. I don't want it to bind to that port and I want it to work just like it did in 2.0.

Any help is appreciated.

Thanks

when you say it is trying to bind you mean that alfresco is trying to bind and failing correct?


Alfresco starts it's own RMI registry which it uses to provide the AVMRemote plumbing.  You should be able to use that registry as well or you can as always create your own registry on the port of your choice.  Were you starting your own registry before?

baradhell
Champ in-the-making
Champ in-the-making
Hello,

I have the same problem. If i kill tomcat server the port 50500 is freed.Then i can start tomcat and deploy my alfresco JCR application and it works.

If i undeploy and deploy it fails.(bind exception) .I have to kill tomcat always to close the port.

Thanks

kbryd
Champ in-the-making
Champ in-the-making
when you say it is trying to bind you mean that alfresco is trying to bind and failing correct?


Alfresco starts it's own RMI registry which it uses to provide the AVMRemote plumbing.  You should be able to use that registry as well or you can as always create your own registry on the port of your choice.  Were you starting your own registry before?

Hi

So could you describe how one can use Alfresco RMI registry?

I am using EMC Documentum but I would like to learn something about Alfresco as well….and I am asking because I have noticed that I can't run JCR or "Foundation" API examples while I have Tomcat with Alfresco running, in such cases I get:

Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]

I suppose that I could run Webservices example but Webservices CML language is very awkard and also using Webservices for connecting to a local repository is not very wise from logical and performance point of view (or is it? Smiley Happy.
At the same time it is not logical for me that I am unable to connect to the local repository using Foundation or JCR API, is it true that it is not possible without using JCR RMI (which as I have read somewhere is not usable at the moment?)

Sorry if these questions were already asked, I really Smiley Happy tried to find answers but with no luck…

Thanks

kbryd
Champ in-the-making
Champ in-the-making
OK, I think I will answer myself Smiley Happy

So, I have changed the RMI port in alfresco-shared.properties (found in config.jar in Alfresco SDK) to some other value than 50500 and it works now Smiley Happy

What I don't understand is why changing that value in custom-alfresco-shared.properties (extension folder in samples) didn't work…

Anyway, I can now proceed!

Karol

gerald_quimpo
Champ in-the-making
Champ in-the-making
So, I have changed the RMI port in alfresco-shared.properties (found in config.jar in Alfresco SDK) to some other value than 50500 and it works now Smiley Happy

What I don't understand is why changing that value in custom-alfresco-shared.properties (extension folder in samples) didn't work…

Anyway, I can now proceed!

Karol

Thanks for that pointer.  I followed your advice and was able to move forward. 

I looked at the issue again and realized what the problem was.

the custom-alfresco-shared.properties file that comes with the SDK  has the wrong keys in there.

This is what is originally in the file.
# MBeanServer registry  (protocol: RMI)
# avm.jmxrmi.port=50500
# AVMRemote API         (protocol: RMI)
# avm.remote.port=1313

the correct keynames (copied from config.jar in lib/server) are:

avm.remote.port=50502
avm.remote.host=localhost

so, to fix the problem without modifying the lib/server/config.jar, just use the avm.remote.* keys in custom-alfresco-shared.properties
Getting started

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.