[opencms-dev] Duplicate Entry Exception While CmsObject.LoginUser() - Please Help urgent

Govind R rocks2984 at gmail.com
Wed May 20 09:44:04 CEST 2009


Hi Nacho

Thanks a lot for the clarification.

Actually I have a scenario (Where for the application there can be many
Administrators) who can log in the application. These is pretty much
possible.
Can this be handled in some way by me or need to wait for Alkacon guys.(Have
u logged a bug?)

Can i check the logged in User from the CmsObject which i cam compare with
who is logging in.

Thanks once agian.


Regards
Govind R





2009/5/20 Nacho Fernández Orellana <nacho.fernandez.orellana at gmail.com>

> Dear Govind and list,
>
> Funny that just yesterday we faced the same issue (stressing with JMeter an
> OpenCms installation that included login into the workplace). The problem
> reason is that the method that writes user info
> (org.opencms.db.generic.CmsUserDriver.internalWriteUserInfos) first deletes
> the user info and then loops through the different user info nodes and
> writes them one by one. All this block is not synchronized, so concurrent
> accesses to inserting (after having both executions deleted) with the same
> pair "user_id" and "data_key" will produce a database key violation
> exception.
>
> This issue is real but by concept it should also be unimportant, because
> for this issue to happen you have to have THE SAME USER login twice at the
> same time, and the same time means just in the code after deleting user info
> and while inserting. This is almost impossible for actual users to reproduce
> even if several logs in with the same username.
>
> I guess it's up to Alkacon guys to evaluate the need of synchronizing that
> block of code or not. I hope this helped. Greetings,
>
> Nacho Fernandez.
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090520/aa86bfcb/attachment.htm>


More information about the opencms-dev mailing list