CustomMembershipLoginModule should end lifecycle in case of an error
--------------------------------------------------------------------
Key: GTNPORTAL-2026
URL:
https://issues.jboss.org/browse/GTNPORTAL-2026
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.2.0-M01
Reporter: Boleslaw Dawidowicz
Assignee: Boleslaw Dawidowicz
Fix For: 3.2.0-M02
A misconfiguration of the CustomMembershipLoginModule (eg. an incorrect/missing
membershipType value), the addUserToPlatformUsers method fails with the following error:
javax.naming.InvalidNameException: Can not create membership record for jduke1 because
membership type is null
at
org.exoplatform.services.organization.idm.MembershipDAOImpl.linkMembership(MembershipDAOImpl.java:131)
at
org.exoplatform.services.organization.idm.CustomMembershipLoginModule.addUserToPlatformUsers(CustomMembershipLoginModule.java:156)
at
org.exoplatform.services.organization.idm.CustomMembershipLoginModule.login(CustomMembershipLoginModule.java:102)
As a consequence, the RequestLifeCycle.end() method won't be called, which results in
an unclosed db connection:
INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself:
org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@7e138f1b
java.lang.Throwable: STACKTRACE
...
at
org.exoplatform.services.organization.idm.CustomMembershipLoginModule.begin(CustomMembershipLoginModule.java:170)
at
org.exoplatform.services.organization.idm.CustomMembershipLoginModule.addUserToPlatformUsers(CustomMembershipLoginModule.java:152)
at
org.exoplatform.services.organization.idm.CustomMembershipLoginModule.login(CustomMembershipLoginModule.java:102)
The end(orgService) call should be made in a finally() block.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira