<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>development corrupts</title>
  <link>https://afuna.dreamwidth.org/</link>
  <description>development corrupts - Dreamwidth Studios</description>
  <lastBuildDate>Wed, 06 Jan 2010 09:08:18 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>afuna</lj:journal>
  <lj:journaltype>personal</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/13/32</url>
    <title>development corrupts</title>
    <link>https://afuna.dreamwidth.org/</link>
    <width>100</width>
    <height>100</height>
  </image>

<item>
  <guid isPermaLink='true'>https://afuna.dreamwidth.org/75531.html</guid>
  <pubDate>Wed, 06 Jan 2010 09:08:18 GMT</pubDate>
  <title>Null optlock causes updates to fail</title>
  <link>https://afuna.dreamwidth.org/75531.html</link>
  <description>I&apos;ve spent the afternoon tracing a legacy data issue, which was preventing any changes on older records from being saved. It turns out that having a null value for an optlock in the database, causes a org.hibernate.StaleObjectStateException; I also saw javax.persistence.EntityNotFoundException in the logs. &lt;br /&gt;&lt;br /&gt;Funny, this is the reverse of what most other people have run into -- most other people getting the EntityNotFoundException were doing so because they had an invalid id, and the fix for them was to make their id NULL.&lt;br /&gt;&lt;br /&gt;In hindsight, it was to be expected. Would it be better behavior to instead handle this case more gracefully (treat null as a 0, instead of an exception)? I can&apos;t make up my mind. It would have made things easier for me, but it does seem rather an edge case, made possible only because we&apos;d migrated old data into the system.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=afuna&amp;ditemid=75531&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://afuna.dreamwidth.org/75531.html</comments>
  <category>my first workplace</category>
  <category>java</category>
  <lj:security>public</lj:security>
  <lj:reply-count>6</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://afuna.dreamwidth.org/47380.html</guid>
  <pubDate>Wed, 28 Oct 2009 08:09:21 GMT</pubDate>
  <title>enterprise java</title>
  <link>https://afuna.dreamwidth.org/47380.html</link>
  <description>I am discovering, to my absolute &lt;em&gt;horror&lt;/em&gt; that enterprise Java is a lot like myself: often has a point, but unable to get there without going on long rambling tangents; requires a lot of structure to hold itself together; loves, loves, loves to scatter and repeat itself everywhere.&lt;br /&gt;&lt;br /&gt;I am reading tutorials on how to set up and use JPA. Sooooo many things that need to be set up before you can even test whether you can, say, connect to a database. And at that, all the articles make it a point to emphasize how wow, the new API makes life so much easier and better more convenient and faster than before (perhaps I shall one day see the difference, the way I did when I was being frustrated by maven&apos;s complexity, and then had to use ant briefly, which made me realize what all the fuss about maven was about)&lt;br /&gt;&lt;br /&gt;I definitely cannot mistake what I am doing as anything other than work. Which is not a bad thing! I have plenty of toys to play with on my off time :)&lt;br /&gt;&lt;br /&gt;Less frustrating, more flexible, more lightweight, more exciting, more practical, toys.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=afuna&amp;ditemid=47380&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://afuna.dreamwidth.org/47380.html</comments>
  <category>my first workplace</category>
  <category>java</category>
  <lj:security>public</lj:security>
  <lj:reply-count>3</lj:reply-count>
</item>
</channel>
</rss>
