From: Jeremy B. <jb...@us...> - 2003-05-03 19:32:58
|
I rewrote the PageSizeUnitTestCase yesterday to inspect the cache and test its behaviour. I will commit this for 3.2.2 when Scott gives the OK. Jeremy > -----Original Message----- > From: jbo...@li... > [mailto:jbo...@li...] On > Behalf Of Alex Loubyansky > Sent: Saturday, May 03, 2003 2:06 AM > To: Jeremy Boynes > Subject: Re[2]: [JBoss-dev] Re: [jboss-cvs] > jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge > JDBCCMP2xFieldBridge.java > > > Just tested read-ahead with the change and it works fine :) > Sorry for the noise but, as we don't have tests for > preloading, I just wanted to be sure everything is ok. > > Thank you, > alex > > Friday, May 02, 2003, 3:05:50 PM, Jeremy Boynes wrote: > > JB> I ran the cmp2 testsuite ... > > JB> Seriously, I assume you are worried that the read-ahead tests are > JB> getting broken due to the change to RequiresNew, but they > are still > JB> passing. If you have to eyeball the log to see if a test did the > JB> right thing, then it is essentially useless as it is > never going to > JB> catch a regression. If that is the case then we need to re-write > JB> those tests. > > JB> The Simple test needs to do something to flush the state > to disk - > JB> the reason this issue wasn't caught without RequiresNew was that > JB> everything always remained in cache. The previous verison of the > JB> test never actually used values fetched from the database. > > JB> Jeremy > > >> -----Original Message----- > >> From: jbo...@li... > >> [mailto:jbo...@li...] On > >> Behalf Of Alex Loubyansky > >> Sent: Friday, May 02, 2003 1:09 AM > >> To: jboss-dev > >> Subject: [JBoss-dev] Re: [jboss-cvs] > >> jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge > >> JDBCCMP2xFieldBridge.java > >> > >> > >> Jeremy, have you tested read-ahead after this change? > >> > >> alex > >> > >> Friday, May 02, 2003, 6:14:28 AM, Jeremy Boynes wrote: > >> > >> JB> User: jboynes > >> JB> Date: 03/05/01 20:14:27 > >> > >> JB> Modified: > src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge Tag: > >> JB> Branch_3_2 JDBCCMP2xFieldBridge.java > >> JB> Log: > >> JB> Fix for [ 730157 ] Changes to Serializable CMP > fields not stored > >> JB> Change CMP2.x set accessor so that the field is always > >> marked as dirty. > >> JB> Previously fields were only marked as dirty if they had > >> changed but this fails > >> JB> when the field's type is mutable. > >> JB> Changed SimpleUnitTest to RequiresNew to ensure EJB > is always > >> JB> loaded/stored > >> > >> JB> Revision Changes Path > >> JB> No revision > >> > >> > >> JB> No revision > >> > >> > >> JB> 1.13.4.11 +4 -11 > >> jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/bridge/JDBCCMP2x > >> FieldBridge.java > >> > >> JB> Index: JDBCCMP2xFieldBridge.java > >> JB> > >> =================================================================== > >> JB> RCS file: > >> /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/b > >> ridge/JDBCCMP2xFieldBridge.java,v > >> JB> retrieving revision 1.13.4.10 > >> JB> retrieving revision 1.13.4.11 > >> JB> diff -u -r1.13.4.10 -r1.13.4.11 > >> JB> --- JDBCCMP2xFieldBridge.java 25 Mar 2003 16:37:21 > >> -0000 1.13.4.10 > >> JB> +++ JDBCCMP2xFieldBridge.java 2 May 2003 03:14:26 -0000 > >> 1.13.4.11 > >> JB> @@ -36,7 +36,7 @@ > >> JB> * > >> JB> * @author <a href="mailto:da...@da...">Dain > >> Sundstrom</a> > >> JB> * @author <a href="mailto:al...@jb...">Alex > Loubyansky</a> > >> JB> - * @version $Revision: 1.13.4.10 $ > >> JB> + * @version $Revision: 1.13.4.11 $ > >> JB> */ > >> JB> public class JDBCCMP2xFieldBridge extends > >> JDBCAbstractCMPFieldBridge > >> JB> { > >> JB> @@ -220,17 +220,10 @@ > >> JB> { > >> JB> FieldState fieldState = getFieldState(ctx); > >> > >> JB> - // short-circuit to avoid repetive comparisons > >> JB> - // The field is considered dirty if it is > >> JB> - // not loaded yet > >> JB> - // OR it is already dirty > >> JB> - // OR it is changed > >> JB> - // The above doesn't touch version field (to > >> avoid races in UPDATE sql) > >> JB> - // and FK field mapped to a PK field > >> JB> + // The field is considered dirty unless it is a > >> version field or is a FK field mapped to a PK field > >> JB> fieldState.isDirty = > >> JB> - (!fieldState.isLoaded || fieldState.isDirty > >> || changed(fieldState.value, value)) > >> JB> - && > >> (getManager().getEntityBridge().getVersionField() != this) > >> JB> - && !isFKFieldMappedToCMPField(); > >> JB> + > >> (getManager().getEntityBridge().getVersionField() != this) > >> JB> + && !isFKFieldMappedToCMPField(); > >> > >> JB> // notify optimistic lock, but only if the bean > >> is created > >> JB> if(ctx.getId() != null && fieldState.isLoaded()) > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Jboss-development mailing list Jbo...@li... > https://lists.sourceforge.net/lists/listinfo/jboss-development > |