-
1. Re: can someone post isModified method
juha Sep 17, 2001 6:58 AM (in response to atatinen)You need to implement the method boolean isModified() in your bean. JBoss will check the existence of this method in the bean implementation and call it at appropriate times.
-
2. Re: can someone post isModified method
p_d_austin Sep 17, 2001 7:05 AM (in response to atatinen)public class MyBean .... {
private boolean modified;
public boolean isModified() {
return modified;
}
public void setField(String field) {
this.field = field;
moidified = true;
}
public void ejbStore() {
modified = false;
}
} -
3. Re: can someone post isModified method
jamaladdin Jul 12, 2002 5:58 AM (in response to atatinen)public boolean isModified(){
System.out.println("Meslehet - "+modified);
if (modified) {
modified=false;
}
return !modified;
}
Jamal Hasanov
www.j-think.com -
4. Re: can someone post isModified method
jamaladdin Jul 12, 2002 6:40 AM (in response to atatinen)Sorry, the correct decaration is
public boolean isModified(){
if (modified) {
modified=false;
return true;
}
else
return false;
}
Jamal Hasanov
www.j-think.com -
5. Re: can someone post isModified method
hcguersoy Nov 25, 2002 10:20 AM (in response to atatinen)Hi Folks!
> You need to implement the method boolean isModified()
> in your bean. JBoss will check the existence of this
> method in the bean implementation and call it at
> appropriate times.
Is this functionality aviable in JBoss 3.0.4 (or later)? I have looked in all docs i have for 3.0 and the last statement i found was in a doc-file for 3.0a.
How this is handled in newer JBoss-versions?
Thanks! -
6. Re: can someone post isModified method
rakhbari Aug 8, 2003 4:07 PM (in response to atatinen)> Hi Folks!
>
> > You need to implement the method boolean
> isModified()
> > in your bean. JBoss will check the existence of
> this
> > method in the bean implementation and call it at
> > appropriate times.
>
> Is this functionality aviable in JBoss 3.0.4 (or
> later)? I have looked in all docs i have for 3.0 and
> the last statement i found was in a doc-file for
> 3.0a.
>
> How this is handled in newer JBoss-versions?
>
> Thanks!
I've done several tests now and at least JBoss 3.2.1 CMP completely ignores the isModified() method. I ended up having to modify the XDoclet template so that it inserts the call to isModified() and makeClean() in the generated xxxxxxCMP.java class. JBoss appears to call ejbStore() regardless, but at least now my code does a call to isModified() and immediately returns if it returns false.
-RA