cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco RMI transactions

darionis
Champ on-the-rise
Champ on-the-rise
Hello all,

I wanted to try RMI access to alfresco, I configured NodeService, PersonService etc  as RemoteServices, made a spring clinet and it really works! (though I had to make some Alfresco classes serializable).

Now I wander if I could execute few service calls within transaction? Calling TransactionService remotely or and using RetryingTransactionCallback throws serilization excpetions:
Caused by: java.io.NotSerializableException: org.alfresco.repo.transaction.RetryingTransactionHelper.

Implementing serializable to transaction classes does not look feasible to me.

Has anybody got any suggestion or idea how to use transactions with RMI?


Being Java veteran, I find webscript services really awkward to develop and use. Calling remote services with RMI is like a breeze, and I don't want to go back. I'd appreciate any suggestion regarding RMI, transactions and alfresco.

Thank you very much!

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

access via RMI will inherhently use transactions e.g. to handle a removeNode call. Unless you rewrite the RMI parts of Alfresco and add a RMI layer on top of the TransactionService, I can't think of a way you'd be able to remote control transactions via RMI.

If you really need to manage transactions remotely / manually, maybe your solution should either embed Alfresco or delegate part of the logic to an addon you have installed into Alfresco. Your addon could also provide the business RMI services you'd need instead of you relying on very low-level ones provided by Alfresco.

Regards
Axel

darionis
Champ on-the-rise
Champ on-the-rise
Thanks, I understand your point. It seems to me that creating my own spring bean and configuring RMI acceess will be much easier than creating java-backed webscript.