<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Prevent concurrent modifications of the same User object</title>
  <link rel="self" href="https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122712894" />
  <subtitle>Prevent concurrent modifications of the same User object</subtitle>
  <id>https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=122712894</id>
  <updated>2026-04-09T13:58:50Z</updated>
  <dc:date>2026-04-09T13:58:50Z</dc:date>
  <entry>
    <title>RE: Prevent concurrent modifications of the same User object</title>
    <link rel="alternate" href="https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122748795" />
    <author>
      <name>Jamie Sammons</name>
    </author>
    <id>https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122748795</id>
    <updated>2024-07-01T20:35:55Z</updated>
    <published>2024-07-01T20:35:54Z</published>
    <summary type="html">&lt;p&gt;Bug report created: https://liferay.atlassian.net/browse/LPD-30166&lt;/p&gt;</summary>
    <dc:creator>Jamie Sammons</dc:creator>
    <dc:date>2024-07-01T20:35:54Z</dc:date>
  </entry>
  <entry>
    <title>Prevent concurrent modifications of the same User object</title>
    <link rel="alternate" href="https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122712893" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122712893</id>
    <updated>2024-06-18T10:35:16Z</updated>
    <published>2024-06-18T10:35:14Z</published>
    <summary type="html">&lt;p&gt;When the User is signed in, the last login date is updated in DB.
  However, in some scenarios, this can happen in multiple threads, and fail:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;2024-06-18 08:12:16.932 ERROR [ajp-nio-127.0.0.1-8009-exec-2085][MainServlet:543] null
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.liferay.portal.model.impl.UserImpl#964101]&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
  &lt;li&gt;Enable&amp;nbsp;the Remember Me option when logging into the portal&lt;/li&gt;
  &lt;li&gt;Open portal pages in multiple tabs&lt;/li&gt;
  &lt;li&gt;Close the browser&lt;/li&gt;
  &lt;li&gt;Open the browser. The tabs with portal pages are reloaded and each
    performs auto-logging on behalf of the user (in fast pace). These
    requests are processed in multiple threads and sometimes&amp;nbsp;fail.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2024-06-18T10:35:14Z</dc:date>
  </entry>
</feed>
