Fórum
Transactions in custom service no related with database
Pawel K, modificado 11 Anos atrás.
Transactions in custom service no related with database
New Member Postagens: 3 Data de Entrada: 09/01/12 Postagens Recentes
Hi Liferay Community
I want to create a custom service which is not related to database. It provides some logic
which has to support transactions. Due the fact that service is not related with database I cannot
use service builder.
I will be appreciated for any help/hint/advice
thanks a lot
Pawel
I want to create a custom service which is not related to database. It provides some logic
which has to support transactions. Due the fact that service is not related with database I cannot
use service builder.
I will be appreciated for any help/hint/advice
thanks a lot
Pawel
Hitoshi Ozawa, modificado 11 Anos atrás.
RE: Transactions in custom service no related with database
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
If there's not persistence entity involved, you can use resourceURL
Pawel K, modificado 11 Anos atrás.
RE: Transactions in custom service no related with database
New Member Postagens: 3 Data de Entrada: 09/01/12 Postagens Recentes
Thanks for your answer.
However I think some clarification of may problem is needed so I describe may use case more precisely.
I have created ext project which imports users from LDAP to Liferay.
Based on some data from LDAP some user groups and / or organization may be created.
Unfortunately sometimes process of creating and assigning users to user groups/ organization fails
and I have inconsistent data in the portal.
Is there any Liferay mechanism or mechanism which is used by Liferay, which can treat
a set of methods call as a transaction and in case of same failure rolls everything back??
BR
Pawel
However I think some clarification of may problem is needed so I describe may use case more precisely.
I have created ext project which imports users from LDAP to Liferay.
Based on some data from LDAP some user groups and / or organization may be created.
Unfortunately sometimes process of creating and assigning users to user groups/ organization fails
and I have inconsistent data in the portal.
Is there any Liferay mechanism or mechanism which is used by Liferay, which can treat
a set of methods call as a transaction and in case of same failure rolls everything back??
BR
Pawel
David H Nebinger, modificado 11 Anos atrás.
RE: Transactions in custom service no related with database
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens RecentesPawel K:
Unfortunately sometimes process of creating and assigning users to user groups/ organization fails
and I have inconsistent data in the portal.
Is there any Liferay mechanism or mechanism which is used by Liferay, which can treat
a set of methods call as a transaction and in case of same failure rolls everything back??
I don't believe it's the Liferay API that is failing and no, the individual calls cannot be 'rolled back' (adding a user, for example, writes the user to the index and the database and for this there is no concept of a rollback for this).
Instead you should figure out why your code is failing and fix it.