[ 
https://issues.apache.org/jira/browse/ROL-1435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920522#action_12920522
 ] 

Roberto commented on ROL-1435:
------------------------------

I had this problem too...

first I fix my database with this: 
https://issues.apache.org/jira/browse/ROL-1760

After the database fix, the tasks wasn´t running correctly. With debugging I 
saw JPAThreadManagerImpl unregisterLease() executing update for set lease time 
to 0 and RollerTaskWithLeasing calling 
WebloggerFactory.getWeblogger().release(). That is JPAWebloggerImpl release(). 
The JPAWeblloggerImpl release call JPAPersistenceStrategy release(), doing a 
rollback if "isTranctionActive(em)". The update for set lease time to 0 was not 
executed.

Looking at 
https://svn.apache.org/repos/asf/roller/trunk/weblogger-business/src/main/java/org/apache/roller/weblogger/business/jpa/JPAThreadManagerImpl.java
I think it's fixed in Roller 5.0 with "strategy.flush()" in 
JPAThreadManagerImpl.unregisterLease(). It worked for me.

if(result == 1) {
   strategy.flush();
   return true;
}

> unregistering leases for scheduled tasks not working in JPA backend
> -------------------------------------------------------------------
>
>                 Key: ROL-1435
>                 URL: https://issues.apache.org/jira/browse/ROL-1435
>             Project: Roller
>          Issue Type: Bug
>          Components: JPA Backend
>    Affects Versions: 4.0
>            Reporter: Allen Gilliland
>            Assignee: Roller Unassigned
>
> The JPAThreadManagerImpl implementation of the unregisterLease() method is 
> somehow not properly unregistering leases.  When a lease is unregistered it 
> is supposed to update the tasklock record in the database so that the 
> timeLeased column is equal to the scheduled tasks interval, but in the JPA 
> backend this is not happening properly and when a task is unregistered the 
> timeLeased value is never updated.
> The end result is that tasks are not running at the proper intervals because 
> they think something else still has a valid lease on the task.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to