cancel
Showing results for 
Search instead for 
Did you mean: 

Using transactions with CMIS & RESTful API

andennis
Champ in-the-making
Champ in-the-making
Hi Everyone
I use DotCMIS and RESTful APIs to interact with Alfresco. (.NET app)
Is there any way, using CMIS and RESTful APIs, to roll back data modification operations like e.g. folders\document\user\group creation\renaming\deleting?
In other words, does Alfresco support transactions in that case?
Thanks
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
No - each webscript invocation is a separate transaction on the server.  By the time you get the result over REST the transaction has either been committed or rolled back.

andennis
Champ in-the-making
Champ in-the-making
No - each webscript invocation is a separate transaction on the server.  By the time you get the result over REST the transaction has either been committed or rolled back.

Thanks a lot for your answer.
Would you please suggest any solution to roll back the modification operations.
For example:
May transaction be used with JavaScript API?
May I have direct access to Alfresco database? Is it good practice?

mrogers
Star Contributor
Star Contributor
Why do you want to roll back? 

You can use distributed transactions if you really need to with the Java API.  For example folks wrap the Java API with EJB.   But its a rare use case that will require it and will require reconfiguration (via Spring) of the transaction manager and the database resource.

vikashkaushik
Champ in-the-making
Champ in-the-making
Hi,

Can you please let us know how to reconfigure the transaction manager and the database resource via Spring, so that we will able to rollback the transaction performed when some conditions are met.


The scenario that we need currently is :

1. Creation of document in Alfresco using CMIS
2. Insertion of the details of document in DB

So when DB insertion fails, we need to rollback the document creation transaction.