Home

TODO

Notes

Questions

Links

Socorro Info

Steve's Notes

  1. To configure tomcat for more heap space: export CATALINA_OPTS="-Xms512m -Xmx512m"
  2. Hibernate problem: using the session-per-request-with-detached-objects paradigm (as opposed to the long-lived conversation paradigm) within hibernate means that you must from time to time reattach detached persistent objects which were loaded in one session / persistent context into another session / persistent context, so that these objects can then be modified & the changes persisted back to the database.

    There can be annoying problems with this; one such problem is the hibernate exception:

    org.hibernate.HibernateException: reassociated object has dirty collection...

    There can be several reasons for this; one reason is if you've reattached using session.update, then modified the object, and then try to call session.update (again, redundantly) on the object. You need only do *one* session.update for a given object, after which you can then modify it & allow the unit of work, when it ends, to commit the changes. Calling update the second time, redundantly, appears to cause this exception.


Disclaimer: This page does not represent in any way the official view of the Observatory. Modified on Wednesday, 21-Oct-2009 16:14:38 MDT