This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Portals and Portlets and the fly likes Is my application transaction can propagate the LIferay service layer transaction on rollback? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "Is my application transaction can propagate the LIferay service layer transaction on rollback?" Watch "Is my application transaction can propagate the LIferay service layer transaction on rollback?" New topic
Author

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

suresh dasari
Ranch Hand

Joined: Oct 05, 2009
Posts: 121

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.


Sun Certified Java Programmer with 93 percent
Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 200

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.
abhinav ladani
Greenhorn

Joined: May 24, 2012
Posts: 1
hey

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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is my application transaction can propagate the LIferay service layer transaction on rollback?
 
Similar Threads
hbm.xml file generation in netbeans
Sync up my own database with liferay database
Need Help for creating Java portlet
Liferay - Authentication with legacy web services
File Management