• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is my application transaction can propagate the LIferay service layer transaction on rollback?

 
Ranch Hand
Posts: 121
Mac Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am working on an application that uses liferay framework. There is a registration portlet that registers the user in liferay and also inserting an entry into my application database mapping table with the liferay userid.
I want both tasks should be in one transaction only, if my mapping table entry fails I want to revert back the user creation in liferay.
Can I have a transaction in my application by overriding the liferay's transaction to rollback for my own exception?

any help is appreciated.

thanks,
Suresh.
 
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're familiar with Liferay's Service Layer then you can use that to perform CRUD operations on entities like User in Liferay's configured database. If you use the built-in methods to create a user in order to generate the new userId, you can subsequently delete the user if the mapping table operation fails.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey

Its simple in lifeay if you want to add or register new user you can use "UserLocalServiceUtil.addUser(, ,,,,,) "method.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic