[jboss-cvs] JBossCache/examples/PojoCache/loadtime ...

Ben Wang bwang at jboss.com
Sun Sep 24 05:25:52 EDT 2006


  User: bwang   
  Date: 06/09/24 05:25:52

  Modified:    examples/PojoCache/loadtime    build.properties build.xml
                        readme.txt
  Log:
  Updated with pojocache-aop.xml
  
  Revision  Changes    Path
  1.3       +3 -3      JBossCache/examples/PojoCache/loadtime/build.properties
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: build.properties
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/examples/PojoCache/loadtime/build.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- build.properties	5 Feb 2006 11:54:41 -0000	1.2
  +++ build.properties	24 Sep 2006 09:25:52 -0000	1.3
  @@ -14,9 +14,9 @@
   output=${basedir}/output
   build=${output}/classes
   cache_home=${basedir}/../../..
  -lib=${cache_home}/lib
  -etc=${cache_home}/etc
  -resources=${cache_home}/resources
  +cache_lib=${cache_home}/lib
  +cache_etc=${cache_home}/etc
  +cache_resources=${cache_home}/resources
   
   #Directory for Junit test result. Subdirectory html contains the result in html format.
   reports=${output}/reports
  
  
  
  1.3       +5 -12     JBossCache/examples/PojoCache/loadtime/build.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/examples/PojoCache/loadtime/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- build.xml	20 Sep 2006 10:45:45 -0000	1.2
  +++ build.xml	24 Sep 2006 09:25:52 -0000	1.3
  @@ -21,7 +21,7 @@
           <include name="trove.jar" />
           <include name="concurrent.jar" />
           <include name="jboss-common.jar" />
  -        <include name="jboss-aop.jar" />
  +        <include name="jboss-aop-jdk50.jar" />
           <include name="log4j.jar" />
         </fileset>
     </path>
  @@ -31,7 +31,7 @@
         <echo message="         compile       -- compile the examples code" />
         <echo message="         clobber       -- clean up the whole directory" />
         <echo message="         run.aop.example -- run aop examples with annoc and aopc pre-compiler" />
  -      <echo message="         run.aop.demo  -- run demo gui for aop cache" />
  +      <echo message="         run.aop.demo  -- run demo gui for cache" />
     </target>
   
     <!-- set up directory -->
  @@ -68,24 +68,17 @@
             <include name="**/*"/>
          </fileset>
        </copy>
  -
  -  	  <!-- Use the jboss-aop.xml from the src dir -->
  -     <copy file="${source}/jboss-aop.xml"
  -     	     todir="${output}/etc/META-INF" overwrite="true"/>
  -
     </target>
   
     <target name="run.aop.example" depends="compile" description="run standalone server replicator.">
   
  -    <!-- Create a special bootclasspath that contains the classloader we generated,
  -         plus the library files used by aop.  DO NOT INCLUDE the domain model classes -->
       <java classname="test.examples.StudentMaintTest" fork="yes" >
   
  -      <!-- Set the bootclasspath to be the one we created above -->
  +      <!-- Use jboss aop specific class loader -->
         <jvmarg value="-javaagent:${lib}/jboss-aop-jdk50.jar"/>
   
  -      <!-- don't need to specify jboss.aop.path, as aop will find META-INF/jboss-aop.xml automatically -->
  -      <!--jvmarg value="-Djboss.aop.path=${output}/etc/META-INF/jboss-aop.xml"/-->
  +      <!-- Alternatively aop will find META-INF/pojocache-aop.xml automatically -->
  +      <jvmarg value="-Djboss.aop.path=${cache_resources}/pojocache-aop.xml"/>
   
         <classpath refid="lib.classpath" />
         <classpath path="${build}" />
  
  
  
  1.2       +8 -10     JBossCache/examples/PojoCache/loadtime/readme.txt
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: readme.txt
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/examples/PojoCache/loadtime/readme.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- readme.txt	5 Feb 2006 06:42:13 -0000	1.1
  +++ readme.txt	24 Sep 2006 09:25:52 -0000	1.2
  @@ -1,11 +1,9 @@
  -This is an example that illustrates using JBossCacheAop to replicate
  +This is an example that illustrates using PojoCache to replicate
   over a cluster state information about students and the courses they take.
   
   In this example, no special pre-compilation of the classes in the domain model
  -is done (just normal javac compilation).  Instead, the build process creates
  -an instance of org.jboss.aop.hook.GeneratedInstrumentedClassLoader and uses
  -it as the system classloader for the application.  The GeneratedInstrumentedClassLoader
  -instruments the domain model classes at load time.
  +is done (just normal javac compilation).  Instead, we use "javagent" option
  +in JDK5.0 JVM to use the JBoss Aop specific class loader.
   
   The example involves 4 domain model classes, Person, Student, Address
   and Course.  Student is a subclass of Person.  A Person has an Address, while
  @@ -13,20 +11,20 @@
   
   The class test.examples.StudentMaintTest:
   
  -1. Creates two TreeCacheAop instances.
  +1. Creates two PojoCache instances.
   2. Creates two Student instances, assigns them an Address and a Course, and then
   puts them in the cache.
   3. Changes various state fields related to the Students and Courses, and 
   generates output to stdout to show that the state changes are reflected in the 
   other node in the cache.
   
  -The java source files for the example as well as the jboss-aop.xml file
  -used by aopc can be found in the src directory.
  +The java source files for the example can be found in the src directory.
  +
  +Note that we have used jboss.aop.path to locate pojocache-aop.xml file.
   
   You can run the example through Ant.
   
   1. Run "build.bat compile" to do a standard Java compilation. 
   
  -3. Run "build.bat run.aop.example" to run the example.  This target
  -will generate a special classloader, and use it to run the example.
  +3. Run "build.bat run.aop.example" to run the example.  
   
  
  
  



More information about the jboss-cvs-commits mailing list