Author: haint
Date: 2011-12-01 00:07:35 -0500 (Thu, 01 Dec 2011)
New Revision: 8178
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java
Log:
GTNPORTAL-2299 Test Transaction's status before commit
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java
===================================================================
---
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java 2011-12-01
04:43:30 UTC (rev 8177)
+++
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java 2011-12-01
05:07:35 UTC (rev 8178)
@@ -210,11 +210,18 @@
if (configuration.isUseJTA())
{
UserTransaction tx = (UserTransaction)new
InitialContext().lookup("java:comp/UserTransaction");
- tx.commit();
+ if(tx.getStatus() == Status.STATUS_ACTIVE)
+ {
+ tx.commit();
+ }
+
}
else
{
- idmService_.getIdentitySession().getTransaction().commit();
+ if(idmService_.getIdentitySession().getTransaction().isActive())
+ {
+ idmService_.getIdentitySession().getTransaction().commit();
+ }
}
}
catch (Exception e)
Show replies by date