Hi! While looking into Hibernate I found a solution for making it possible for vanilla java objects to inform OJB if it was New or just dirty. This is/was a problem concerning when two (or more) threads could have a "race-condition" regarding using and deleting each others objects.
>From Hibernate javadoc: public void saveOrUpdate(Object object) throws SQLException, HibernateException Either save() or update() the given instance, depending upon the value of its identifier property. By default the instance is always saved. This behaviour may be adjusted by specifying an 'unsaved-value' attribute of the identifier property mapping. Here there is a method that can save any kind of object and Hibernate decides wether it should be an insert(save) or update that should be performed. The way it does it is that an attribute can be given the special property of being the one that can tell Hibernate wether it should save or not - here called an 'unsaved-value' attribute. By having such a (or more) special attribute(s) then an object does not need to implement a special interface... Just an idea :) /max -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
