{"action":"opened","issue":{"url":"https://api.github.com/repos/jberet/jsr352/issues/62","labels_url":"https://api.github.com/repos/jberet/jsr352/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/jberet/jsr352/issues/62/comments","events_url":"https://api.github.com/repos/jberet/jsr352/issues/62/events","html_url":"https://github.com/jberet/jsr352/issues/62","id":116332286,"number":62,"title":"After the transaction reaper has run , ChunkRunner  does not clear the transaction from the thread","user":{"login":"krishnarbb","id":1201652,"avatar_url":"https://avatars.githubusercontent.com/u/1201652?v=3","gravatar_id":"","url":"https://api.github.com/users/krishnarbb","html_url":"https://github.com/krishnarbb","followers_url":"https://api.github.com/users/krishnarbb/followers","following_url":"https://api.github.com/users/krishnarbb/following{/other_user}","gists_url":"https://api.github.com/users/krishnarbb/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnarbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnarbb/subscriptions","organizations_url":"https://api.github.com/users/krishnarbb/orgs","repos_url":"https://api.github.com/users/krishnarbb/repos","events_url":"https://api.github.com/users/krishnarbb/events{/privacy}","received_events_url":"https://api.github.com/users/krishnarbb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-11T13:03:22Z","updated_at":"2015-11-11T13:03:22Z","closed_at":null,"body":"In https://github.com/jberet/jsr352/blob/master/jberet-core/src/main/java/org/jberet/runtime/runner/ChunkRunner.java  Line 335\r\n\r\n tm.rollback(); is called only for certain status.\r\n\r\nHowever in case when the TransactionReaper has rolled back the transaction, the status will be Status.STATUS_ROLLEDBACK and if tm.rollback  or tm.suspend is never called.\r\n\r\nUnless tm.rollback or tm.suspend is called, the thread is still associated with transaction. \r\nAny new Jobs started will fail if they use this thread already associated with a transaction.\r\n\r\nThe solution for this would be to add Status.STATUS_ROLLEDBACK and Status.STATUS_NO_TRANSACTION in line 332.\r\n\r\n"}}