This one time, at band camp, Mark Thill said:

MT>First, forgive me if something doesn't make sense.  I
MT>have inherited a mess of a project, so I am still
MT>coming up to speed w/ Castor, and the deeper I get the
MT>more I realize that the previous developer was
MT>clueless.
MT>
MT>PROBLEM:
MT>I am having a very strange problem.  I am using long
MT>trasactions via a web interface where a user is
MT>retrieving an object w/ many related objects.  They
MT>edit the object and then save it.  MOST of the time
MT>this process works just fine, but a fair amount of
MT>time I get an ObjectModifiedException thrown.  Let me
MT>also add that when I run it on my machine I can never
MT>reproduce the error.  Only in production where there
MT>is a large amount of traffic can I reproduce this, and
MT>even there it is random at best.  First, I thought it
MT>was probably being thrown for one of the right reasons
MT>(i.e. two users had it open and one saved, therefore
MT>the other user would get an error when saving).  This
MT>appeared to not be the problem, as apparently users
MT>almost never modify the same Object.  Then I read that
MT>it might be a cache problem, so in the mapping file I
MT>added
MT>
MT><cache-type type="time-limited" capacity="28800"/>
MT>
MT>for every class defined.  This seemed to help some as
MT>I believe the default cache was probably not large
MT>enough.  But the problem is still occurring at a rate
MT>that is still a bit alarming.  The only way I can
MT>reproduce this error on my local machine is to open up
MT>the same Object in two browsers and save it in one,
MT>and try to save the other one differently, so I've
MT>been doing that to reproduce the error.  I've tried
MT>using the dirty="ignore" attribute for the mappings
MT>like such:
MT>
MT><field name="investor" type="edr.acts.Person"
MT>required="true">
MT>     <sql dirty="ignore" name="InvestorId" />
MT></field>
MT>
MT>I was thinking that I could open up the same Object
MT>with a related Person object in two browsers and
MT>change the values of the Person object in one, save
MT>it, then change the values of the Person object in the
MT>second browser and save it, and that I would not get
MT>the error (it would overwrite the first save), but
MT>this seems to not be the case and I still get the
MT>ObjectModifiedException.  All of the nodes of the
MT>Person object have dirty="ignore" set on them also. 
MT>So now I'm pretty lost, and don't have a real good
MT>idea of the problem.  Also I noticed that he was
MT>random on which of his classes implemented the
MT>TimeStampable interface.  Do all have to implement
MT>this.  If so why would it work some of the time.
MT>
MT>Can anyone help?  ANY help would be apprecitate.

Mark,

Do you have a stacktrace of the exception? This will tell us where in your
code and in Castor where things are failing. 

Bruce
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to