[gatein-commits] gatein SVN: r7128 - epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Aug 15 11:48:38 EDT 2011


Author: ghjboss
Date: 2011-08-15 11:48:37 -0400 (Mon, 15 Aug 2011)
New Revision: 7128

Modified:
   epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java
Log:
fix for JBEPP-1071

Modified: epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java
===================================================================
--- epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java	2011-08-15 13:44:53 UTC (rev 7127)
+++ epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java	2011-08-15 15:48:37 UTC (rev 7128)
@@ -146,9 +146,10 @@
     */
    private void addUserToPlatformUsers(String userId) throws Exception
    {
+	  OrganizationService orgService = null;
       try
       {
-         OrganizationService orgService = (OrganizationService)getContainer().getComponentInstanceOfType(OrganizationService.class);
+         orgService = (OrganizationService)getContainer().getComponentInstanceOfType(OrganizationService.class);
          begin(orgService);
          User user = orgService.getUserHandler().findUserByName(userId);
          MembershipType memberType = orgService.getMembershipTypeHandler().findMembershipType(membershipType);
@@ -162,6 +163,10 @@
          // don't rethrow login exception in case of failure.
          // throw e;
       }
+      finally 
+      {
+      	 end(orgService);
+      }
    }
    private void begin(OrganizationService orgService) throws Exception
    {



More information about the gatein-commits mailing list