[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2575) The jta transaction manager returns a null transaction when ending a process that was triggered by a jbpm timer.

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Feb 4 09:57:03 EST 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2575?page=all ]

Pete Muir updated JBSEAM-2575:
------------------------------

    Fix Version/s: 2.0.2.GA
                   2.1.0.GA

> The jta transaction manager returns a null transaction when ending a process that was triggered by a jbpm timer.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-2575
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2575
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: BPM
>    Affects Versions: 2.0.0.GA
>         Environment: JBoss AS 4.2.1.GA
> JBoss Seam 2.0.0.GA (with Hibernate 3.2.2.GA and JBPM JPDL 3.2.2)
>            Reporter: Peter Brewer
>             Fix For: 2.0.2.GA, 2.1.0.GA
>
>         Attachments: timertest.zip
>
>
> Summary:
> The jta transaction manager returns a null transaction when ending a process that was triggered by a jbpm timer.
> Steps to reproduce:
> Define a jbpm process containing a task timer with an expiry.
> Start the process and progress to the task with the timer defined.
> Wait for the timer to fire.
> The timer fires and progresses to the end of the workflow. This causes a call to deleteTimersByProcessInstance:
> org.jbpm.db.JobSession.java
> 205  public void deleteJobsForProcessInstance(ProcessInstance processInstance) {
> 206    try {
> 207      Transaction transaction = session.getTransaction();
> 208      transaction.registerSynchronization(new DeleteJobsSynchronization(processInstance));
> 209    } catch (Exception e) {
> 210      log.error(e);
> 211      throw new JbpmException("couldn't delete jobs for '"+processInstance+"'", e);
> 212    }
> 213  }
> Stepping through the code, on line 207 the transaction variable is populated (i.e. not null) but when it calls transaction.registerSynchronization(...):
> org.hibernate.transaction.JTATransaction.java
> 300	public void registerSynchronization(Synchronization sync) throws HibernateException {
> 301		if (getTransactionManager()==null) {
> 302			throw new IllegalStateException("JTA TransactionManager not available");
> 303		}
> 304		else {
> 305			try {
> 306				getTransactionManager().getTransaction().registerSynchronization(sync);
> 307			}
> 308			catch (Exception e) {
> 309				throw new TransactionException("could not register synchronization", e);
> 310			}
> 311		}
> 312	}
> the call on line 306 to getTransactionManager().getTransaction() returns null causing a NPE.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list