Sure, just implementing the public boolean isModified() method in your bean
should do the trick.

Have a nice day! :)

/Magnus Stenman, the Orion team


----- Original Message -----
From: "Jay Jayaprasad" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Wednesday, April 05, 2000 1:58 PM
Subject: CMP dirty flag performance


>
> I have copied below code from the wrapper generated by Orion for the
> NetwsItem.getText method in the news sample. Usually one doesn't get to
see
> the code generated for bean wrappers but one occasion Orion crashed while
> deploying and it left behind the java files for the wrappers.
>
> java.lang.String _submitter = object.submitter;
> java.lang.String _text = object.text;
> java.util.Locale _locale = object.locale;
> java.util.Date _date = object.date == null ? null : new
> java.util.Date(object.date.getTime());
> java.lang.String _subject = object.subject;
> com.evermind.ejb.NewsItem _parent = object.parent;
> try
> {
>     response = object.getText();
> }
> catch(Throwable e)
> {
>     ...
> }
> this.dirty = this.dirty || (((_submitter == null) != (object.submitter ==
> null))
> || (_submitter != null && !_submitter.equals(object.submitter))
> || ((_text == null) != (object.text == null))
> || (_text != null && !_text.equals(object.text))
> || ((_locale == null) != (object.locale == null))
> || (_locale != null && !_locale.equals(object.locale))
> || ((_date == null) != (object.date == null))
> || (_date != null && !_date.equals(object.date))
> || ((_subject == null) != (object.subject == null))
> || (_subject != null && !_subject.equals(object.subject))
> || ((_parent == null) != (object.parent == null))
> || (_parent != null && !_parent.equals(object.parent)));
>
> It seems like in order to figure out if the fields in a CMP have been
> modified, orion compares all CMP field values before and after any method
is
> called in the entity bean. I understand that it makes the programming of
> entity beans easier if one doesn't have to worry about keeping track if
any
> fields have been modified. However, the current Orion solution gets to be
very
> inefficient as the number of fields increases, the size of data in a
String
> field increases etc. Is there any way to prevent Orion from figuring out
the
> dirty state on it's own and instead using an isModified method provided in
the
> entity bean?
>
> Jay Jayaprasad
>
>
> ____________________________________________________________________
> Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.


Reply via email to