[gatein-issues] [JBoss JIRA] (GTNPORTAL-3365) Exception swallow in UserDaoImpl.persistUserInfo()
Vu Viet Phuong (JIRA)
issues at jboss.org
Wed Jan 15 05:52:32 EST 2014
[ https://issues.jboss.org/browse/GTNPORTAL-3365?focusedWorklogId=12430469&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-12430469 ]
Vu Viet Phuong logged work on GTNPORTAL-3365:
---------------------------------------------
Author: Vu Viet Phuong
Created on: 15/Jan/14 5:51 AM
Start Date: 15/Jan/14 5:50 AM
Worklog Time Spent: 6 hours
Work Description: There is 2 problem on Picketlink, so I have to make workaround on the PR to fix for this case. The 2 issues are:
1. Picketlink has not support transaction for LDAP yet
2. Picketlink uses internal cache (infinispan) but this cache is not clear when there is exception occurred
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 4 hours)
Time Spent: 6 hours
Worklog Id: (was: 12430469)
> Exception swallow in UserDaoImpl.persistUserInfo()
> --------------------------------------------------
>
> Key: GTNPORTAL-3365
> URL: https://issues.jboss.org/browse/GTNPORTAL-3365
> Project: GateIn Portal
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Affects Versions: 3.6.3.Final
> Reporter: Vu Viet Phuong
> Assignee: Vu Viet Phuong
> Original Estimate: 4 hours
> Time Spent: 6 hours
> Remaining Estimate: 0 minutes
>
> Under "{{org.exoplatform.services.organization.idm}},
> focus on :
> {code:title=UserDAOImp.java|borderStyle=solid}
> public void persistUserInfo(User user, IdentitySession session) throws Exception
> {
> orgService.flush();
> AttributesManager am = session.getAttributesManager();
> ArrayList attributes = new ArrayList();
> /* ... */
> if (user.getPassword() != null)
> {
> if (orgService.getConfiguration().isPasswordAsAttribute())
> {
> attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
> }
> else
> {
> try
> {
> am.updatePassword(session.getPersistenceManager().findUser(user.getUserName()), user.getPassword());
> }
> catch (IdentityException e)
> {
> log.info("Cannot update password: " + user.getUserName() + "; ", e);
> }
> }
> }
> Attribute[] attrs = new Attribute[attributes.size()];
> attrs = (Attribute[])attributes.toArray(attrs);
> try
> {
> am.updateAttributes(user.getUserName(), attrs);
> }
> catch (IdentityException e)
> {
> log.info("Cannot update attributes for user: " + user.getUserName() + "; ", e);
> }
> }
> {code}
>
> The method {{saveUser(User, boolean) _throws Exception_}}
> calls
> {{persistUserInfo(User user, IdentitySession session) _throws Exception_}}.
>
> Whereas, deeper in the code, you can easily notice that exceptions are caught in this level and traced by a {{log.info}}:
> * first time in the password level
> * second time when updating all of the attributes.
> (!) Users want to be notified when an error occurs during user registration.
> As well as being aware of the type of the caught exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list