我從Liferay論壇複製 - 在2周內沒有得到答案。 http://www.liferay.com/community/forums/-/message_boards/message/9384663Liferay交易方式
我在尋找文檔/博客如何進行Liferay交易。
的Liferay 6.0.6 PostgreSQL的
我有JAX-WS Web服務掛鉤。 我只使用Liferay服務。
例如插入文檔並對其進行標記
fileEntry = DLFileEntryServiceUtil.addFileEntry(groupId, folderId, filename, filename, description, changeLog, "extraSettings", buffer, serviceContext);
AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(DLFileEntry.class.getName(), fileEntry.getFolderId());
AssetTagUtil.addAssetEntry(assetTagObj.getPrimaryKey(), assetEntry.getPrimaryKey());
我需要設置事務。
我的類註釋
@MTOM
@WebService(targetNamespace="http://services.portal.xyz/",serviceName="AuditResultService",name = "AuditResult", endpointInterface = "xyz.portal.services.AuditResultWS")
@Transactional(isolation = Isolation.DEFAULT, readOnly = false, rollbackFor = {PortalException.class, SystemException.class, InvalidParameterException.class, NoSuchEntryException.class})
@Transactional是Liferay的一個
方法是用
@WebMethod
WS只有註釋的偉大工程,但沒有交易 - 創建和NoSuchEntryException文件後,文件留在Liferay。
下面試圖根據論壇主題: http://www.liferay.com/community/forums/-/message_boards/message/9019161
portal-ext.properties
transaction.manager.impl=org.springframework.transaction.jta.JtaTransactionManager
transaction.manager.property.allowCustomIsolationLevels=true
transaction.manager.property.globalRollbackOnParticipationFailure=true
我沒有在我的鉤彈簧的配置做任何事情。
我試圖改變隔離等沒有成功。
請有任何指導?
非常感謝您