Foros de discusión

Transaction how-to

thumbnail
Peter Ruzicka, modificado hace 12 años.

Transaction how-to

Junior Member Mensajes: 48 Fecha de incorporación: 7/12/06 Mensajes recientes
Hello,

I am looking for document/blog How to Liferay Transaction.

Liferay 6.0.6
PostgreSQL

I have a hook with jax-ws web services.
I use only Liferay services.

e.g.


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());



I need to setup transaction.

My class annotations
@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 is liferay one

Method is annotated only with
@WebMethod


WS works great, but no transaction - document is created and after NoSuchEntryException document stays in Liferay.

Based on forum thread below tried:
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

I didn't do anything in my hook spring configuration.

I tried to change isolation etc no success.

Please is there any guide?

Thank you much
thumbnail
Prakash Khanchandani, modificado hace 11 años.

RE: Transaction how-to

Expert Mensajes: 329 Fecha de incorporación: 10/02/11 Mensajes recientes
Hi Peter,

Did you find anything helpful regarding Transactions in liferay? If yes can you please post it here?

Thank you
thumbnail
Peter Ruzicka, modificado hace 11 años.

RE: Transaction how-to

Junior Member Mensajes: 48 Fecha de incorporación: 7/12/06 Mensajes recientes
Halo Prakash,

unfortunately I found no solution & no documentation. I didn't have enough (project) time to start from zero.

Sorry
thumbnail
Prakash Khanchandani, modificado hace 11 años.

RE: Transaction how-to

Expert Mensajes: 329 Fecha de incorporación: 10/02/11 Mensajes recientes
Thanks for reply.

I just wanted some hints in this direction.

If you have somehow managed to implement transactions in liferay then I would request only for a couple of steps you took. If not no worries.

Thanks Again for the time taken to reply.