Bugs item #922733, was opened at 2004-03-24 16:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=922733&group_id=22866

Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Nicolas Fournier (nicfournier)
Assigned to: Nobody/Anonymous (nobody)
Summary: java.math.BigDecimal always dirty

Initial Comment:
JBoss 3.2.3
Sun JVM 1.4.2_03
MS SQL Database with Microsft SQL 2000 Driver SP2

I have entity beans with java.math.BigDecimal fields. 
The problem I have is that JBoss always updates all 
BigDecimal fields even if they are not modified by my 
code.

I traced in the source and found a possible explanation: 
BigDecimal gets the default INVALID_UNLESS_NULL 
CMPFieldStateFactory. Looking at the isStateValid 
method of this class:

public boolean isStateValid(Object state, Object 
fieldValue)
      {
         return state == null ? fieldValue == null : false;
      }

and tracing trough the code gives me a non null state 
and fieldValue even if not updated. So isStateValid 
returns false which marks the field as dirty which then 
triggers an update.

I am fully available if more info required.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=922733&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to