[seam-commits] Seam SVN: r14082 - branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Apr 21 10:07:33 EDT 2011
Author: manaRH
Date: 2011-04-21 10:07:33 -0400 (Thu, 21 Apr 2011)
New Revision: 14082
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Contexts.java
Log:
JBPAPP-6244. JBPAPP-5783
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Contexts.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Contexts.java 2011-04-21 13:38:27 UTC (rev 14081)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/contexts/Contexts.java 2011-04-21 14:07:33 UTC (rev 14082)
@@ -345,32 +345,35 @@
//TODO: it would be nice if BP context spanned redirects along with the conversation
// this would also require changes to BusinessProcessContext
- try
+ if ( Init.instance().isTransactionManagementEnabled() )
{
- new Work<Object>()
+ try
{
- @Override
- protected Object work() throws Exception
+ new Work<Object>()
{
- boolean destroyBusinessProcessContext = !Init.instance().isJbpmInstalled() ||
- !BusinessProcess.instance().hasActiveProcess();
- if (destroyBusinessProcessContext)
+ @Override
+ protected Object work() throws Exception
{
- //TODO: note that this occurs from Lifecycle.endRequest(), after
- // the Seam-managed txn was committed, but Contexts.destroy()
- // calls BusinessProcessContext.getNames(), which hits the
- // database!
- log.debug("destroying business process context");
- destroy( getBusinessProcessContext() );
+ boolean destroyBusinessProcessContext = !Init.instance().isJbpmInstalled() ||
+ !BusinessProcess.instance().hasActiveProcess();
+ if (destroyBusinessProcessContext)
+ {
+ //TODO: note that this occurs from Lifecycle.endRequest(), after
+ // the Seam-managed txn was committed, but Contexts.destroy()
+ // calls BusinessProcessContext.getNames(), which hits the
+ // database!
+ log.debug("destroying business process context");
+ destroy( getBusinessProcessContext() );
+ }
+ return null;
}
- return null;
- }
- }.workInTransaction();
+ }.workInTransaction();
+ }
+ catch (final Exception ex)
+ {
+ log.warn("Exception destroying context ", ex);
+ }
}
- catch (final Exception ex)
- {
- log.warn("Exception destroying context ", ex);
- }
}
if ( !Manager.instance().isLongRunningConversation() )
More information about the seam-commits
mailing list