[
https://jira.jboss.org/jira/browse/JBPM-1775?page=com.atlassian.jira.plug...
]
Alejandro Guizar commented on JBPM-1775:
----------------------------------------
The way I see it, the real bug is the "|| persistenceService.getTransaction() ==
null" part, which somehow managed to slip trough. The specific DbPersistenceService
class in use should have full control over telling whether a transaction is in course or
not. In the JtaDbPersistenceService case, getTransaction() will always return null.
DbPersistenceService determines if the transaction is active as follows:
public boolean isTransactionActive() {
return transaction != null && transaction.isActive();
}
which, provided we remove the "transaction == null" part, gives the same result
as your proposed change, Bernd. I am not sure I agree with the
.isTransactionRollbackOnly() addition, since a transaction marked for rollback may still
perform work. Particularly it would render nontransactional exception handlers useless.
For JtaDbPersistenceService we have:
public boolean isTransactionActive() {
SessionFactoryImplementor sessionFactory = (SessionFactoryImplementor)
getSessionFactory();
return JTAHelper.isTransactionInProgress(sessionFactory);
}
JTAHelper queries the JTA transaction manager directly and does not rely on any local
state.
public static boolean isTransactionInProgress(SessionFactoryImplementor factory) {
TransactionManager tm = factory.getTransactionManager();
return tm != null && isTransactionInProgress( tm.getTransaction() );
}
Mark, I believe your issue is best addressed by switching to
JtaDbPersistenceServiceFactory, which implicitly sets isTransactionActive to false and
currentSessionEnabled to true.
verify if collection exceptionHandlers can be loaded lazy
---------------------------------------------------------
Key: JBPM-1775
URL:
https://jira.jboss.org/jira/browse/JBPM-1775
Project: JBoss jBPM
Issue Type: Task
Security Level: Public(Everyone can see)
Components: Runtime Engine
Reporter: Tom Baeyens
Assignee: Alejandro Guizar
Fix For: jBPM 3.3.1 GA
From Martin Putz:
"
A quick test showed that setting all those relations to lazy="true" cuts down
the number of executed SQL selects quite drastically.
I don't see any negative side effects of changing these settings, but I'm curious
about the reasons why lazy="false" is chosen as default. Especially as I
don't see a lot of our customers using exception handlers (or at least they don't
report it).
Regards,
Martin
"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira