sergiogonzalez/liferay-portal — pull request #330 by matethurzo (2012-08-29 13:59:53+00:00)
Title: LPS-28910 releaseResourceBlock should be called through the spring framework

Hey Sergio, this is an easy fix, or at least it does not contain too much coding. When importing bookmarks folders from a lar file the database will cross lock the resourceblok table from two different transactions. After at least two days of debugging I've realized that the problem is that the releaseResourceBlockId is transactional, however it is being called like a local method not via the spring bean. Thus the transaction manager could not commit that change, and the DB will be cross locked. The solution is really really simple, I've modified it to be called via the spring framework <> so it will go all the way through the framework, and the transactions will be handled properly. And it won't be in deadlock anymore. Thanks, Mate