First, forgive me if something doesn't make sense.  I
have inherited a mess of a project, so I am still
coming up to speed w/ Castor, and the deeper I get the
more I realize that the previous developer was
clueless.

PROBLEM:
I am having a very strange problem.  I am using long
trasactions via a web interface where a user is
retrieving an object w/ many related objects.  They
edit the object and then save it.  MOST of the time
this process works just fine, but a fair amount of
time I get an ObjectModifiedException thrown.  Let me
also add that when I run it on my machine I can never
reproduce the error.  Only in production where there
is a large amount of traffic can I reproduce this, and
even there it is random at best.  First, I thought it
was probably being thrown for one of the right reasons
(i.e. two users had it open and one saved, therefore
the other user would get an error when saving).  This
appeared to not be the problem, as apparently users
almost never modify the same Object.  Then I read that
it might be a cache problem, so in the mapping file I
added

<cache-type type="time-limited" capacity="28800"/>

for every class defined.  This seemed to help some as
I believe the default cache was probably not large
enough.  But the problem is still occurring at a rate
that is still a bit alarming.  The only way I can
reproduce this error on my local machine is to open up
the same Object in two browsers and save it in one,
and try to save the other one differently, so I've
been doing that to reproduce the error.  I've tried
using the dirty="ignore" attribute for the mappings
like such:

<field name="investor" type="edr.acts.Person"
required="true">
     <sql dirty="ignore" name="InvestorId" />
</field>

I was thinking that I could open up the same Object
with a related Person object in two browsers and
change the values of the Person object in one, save
it, then change the values of the Person object in the
second browser and save it, and that I would not get
the error (it would overwrite the first save), but
this seems to not be the case and I still get the
ObjectModifiedException.  All of the nodes of the
Person object have dirty="ignore" set on them also. 
So now I'm pretty lost, and don't have a real good
idea of the problem.  Also I noticed that he was
random on which of his classes implemented the
TimeStampable interface.  Do all have to implement
this.  If so why would it work some of the time.

Can anyone help?  ANY help would be apprecitate.

Thanks
Mark
 

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

Reply via email to