掲示板
Transactions in custom service no related with database
11年前 に Pawel K によって更新されました。
Transactions in custom service no related with database
New Member 投稿: 3 参加年月日: 12/01/09 最新の投稿
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
11年前 に Hitoshi Ozawa によって更新されました。
RE: Transactions in custom service no related with database
Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
If there's not persistence entity involved, you can use resourceURL
11年前 に Pawel K によって更新されました。
RE: Transactions in custom service no related with database
New Member 投稿: 3 参加年月日: 12/01/09 最新の投稿
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
11年前 に David H Nebinger によって更新されました。
RE: Transactions in custom service no related with database
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿Pawel 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.