JBoss Cache SVN: r6600 - core/tags.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-23 01:30:52 -0400 (Sat, 23 Aug 2008)
New Revision: 6600
Added:
core/tags/2.2.0.GA/
Log:
Tagging the GA
Copied: core/tags/2.2.0.GA (from rev 6599, core/branches/2.2.X)
15 years, 8 months
Build failed in Hudson: jboss-cache-searchable-trunk-jdk1.6 » JBoss Cache - Searchable Edition #1
by jboss-qa-internal@redhat.com
See http://hudson.qa.jboss.com/hudson/job/jboss-cache-searchable-trunk-jdk1.6...
------------------------------------------
[...truncated 273 lines...]
-------------------------------------------------------
2008-08-22 05:35:28,798 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:37328
-------------------------------------------------------
2008-08-22 05:35:30,842 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:57925
-------------------------------------------------------
2008-08-22 05:35:33,836 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:45829
-------------------------------------------------------
2008-08-22 05:35:35,915 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:53973
-------------------------------------------------------
2008-08-22 05:35:38,059 WARN [FD_SOCK] (OOB,127.0.0.1:53973) (GET_CACHE_RSP): cache is null
found.size() is 2
2008-08-22 05:35:38,756 WARN [FD_SOCK] (FD_SOCK pinger,127.0.0.1:53973) received null cache; retrying
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.86 sec
Running org.jboss.cache.search.blackbox.BrokenAnnotationTest (of functional)
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.431 sec
Running org.jboss.cache.search.LazyQueryResultIteratorTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running org.jboss.cache.search.NodeModifiedTransactionContextTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec
Running org.jboss.cache.search.QueryResultIteratorImplTest (of functional)
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.154 sec
Running org.jboss.cache.search.TransformerTest (of functional)
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec
Running org.jboss.cache.search.blackbox.LocalPOJOCacheTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Running org.jboss.cache.search.SearchableCacheImplTest (of functional)
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.315 sec
Running org.jboss.cache.search.blackbox.LocalCacheTest (of functional)
2008-08-22 05:35:44,378 INFO [Version] (main) Hibernate Commons Annotations 3.1.0.CR1
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.172 sec
Results :
Tests run: 40, Failures: 0, Errors: 0, Skipped: 0
[HUDSON] Recording test results
[INFO] Preparing surefire-report:report-only
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] Preparing emma:emma
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [compiler:compile]
Compiling 2 source files to /mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/target/classes
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [emma:instrument]
[INFO] Instrumenting classes with EMMA
[INFO] EMMA: processing instrumentation path ...
[INFO] EMMA: instrumentation path processed in 138 ms
[INFO] EMMA: [16 class(es) instrumented, 3 resource(s) copied]
[INFO] EMMA: metadata merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/target/coverage.em] {in 14 ms}
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [surefire:test]
[INFO] Surefire report directory: /mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.cache.search.CacheEntityIdTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Running org.jboss.cache.search.blackbox.ClusteredCacheTest (of functional)
2008-08-22 05:37:39,416 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:48764
-------------------------------------------------------
EMMA: collecting runtime coverage data ...
2008-08-22 05:37:41,744 INFO [Version] (main) Hibernate Commons Annotations 3.1.0.CR1
2008-08-22 05:37:41,947 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:50538
-------------------------------------------------------
2008-08-22 05:37:45,112 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:40636
-------------------------------------------------------
2008-08-22 05:37:47,181 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:35739
-------------------------------------------------------
2008-08-22 05:37:50,059 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:51374
-------------------------------------------------------
2008-08-22 05:37:52,123 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:50162
-------------------------------------------------------
2008-08-22 05:37:55,151 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:58078
-------------------------------------------------------
2008-08-22 05:37:57,197 INFO [JChannel] (main) JGroups version: 2.6.2
-------------------------------------------------------
GMS: address is 127.0.0.1:45987
-------------------------------------------------------
2008-08-22 05:37:59,346 WARN [FD_SOCK] (OOB,127.0.0.1:45987) (GET_CACHE_RSP): cache is null
found.size() is 2
2008-08-22 05:38:00,027 WARN [FD_SOCK] (FD_SOCK pinger,127.0.0.1:45987) received null cache; retrying
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.93 sec
EMMA: runtime coverage data merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/coverage.ec] {in 17 ms}
Running org.jboss.cache.search.blackbox.BrokenAnnotationTest (of functional)
EMMA: collecting runtime coverage data ...
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.524 sec
EMMA: runtime coverage data merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/coverage.ec] {in 2 ms}
Running org.jboss.cache.search.LazyQueryResultIteratorTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running org.jboss.cache.search.NodeModifiedTransactionContextTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec
Running org.jboss.cache.search.QueryResultIteratorImplTest (of functional)
EMMA: collecting runtime coverage data ...
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.25 sec
EMMA: runtime coverage data merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/coverage.ec] {in 2 ms}
Running org.jboss.cache.search.TransformerTest (of functional)
EMMA: collecting runtime coverage data ...
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.177 sec
EMMA: runtime coverage data merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/coverage.ec] {in 1 ms}
Running org.jboss.cache.search.blackbox.LocalPOJOCacheTest (of functional)
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 sec
Running org.jboss.cache.search.SearchableCacheImplTest (of functional)
EMMA: collecting runtime coverage data ...
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.36 sec
EMMA: runtime coverage data merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/coverage.ec] {in 1 ms}
Running org.jboss.cache.search.blackbox.LocalCacheTest (of functional)
EMMA: collecting runtime coverage data ...
2008-08-22 05:38:05,939 INFO [Version] (main) Hibernate Commons Annotations 3.1.0.CR1
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.287 sec
Results :
Tests run: 40, Failures: 0, Errors: 0, Skipped: 0
EMMA: runtime coverage data merged into [/mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/coverage.ec] {in 4 ms}
[HUDSON] Recording test results
[INFO] Preparing findbugs:findbugs
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [compiler:compile]
Compiling 2 source files to /mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/target/classes
[WARNING] POM for 'org.apache.lucene:lucene-core:pom:2.3.1:test' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM. for project org.apache.lucene:lucene-core at /home/hudson/.m2/repository/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.pom
[INFO] [site:site]
[FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven-site-plugin]
urls[0] = file:/home/hudson/.m2/repository/org/apache/maven/plugins/maven-site-plugin/2.0-beta-6/maven-site-plugin-2.0-beta-6.jar
urls[1] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.jar
urls[2] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.0-alpha-10/doxia-module-xhtml-1.0-alpha-10.jar
urls[3] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-core/1.0-alpha-10/doxia-core-1.0-alpha-10.jar
urls[4] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0-alpha-10/doxia-decoration-model-1.0-alpha-10.jar
urls[5] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.0-alpha-10/doxia-site-renderer-1.0-alpha-10.jar
urls[6] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
urls[7] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
urls[8] = file:/home/hudson/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
urls[9] = file:/home/hudson/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar
urls[10] = file:/home/hudson/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar
urls[11] = file:/home/hudson/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
urls[12] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-apt/1.0-alpha-10/doxia-module-apt-1.0-alpha-10.jar
urls[13] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.0-alpha-10/doxia-module-fml-1.0-alpha-10.jar
urls[14] = file:/home/hudson/.m2/repository/org/apache/maven/doxia/doxia-module-xdoc/1.0-alpha-10/doxia-module-xdoc-1.0-alpha-10.jar
urls[15] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar
urls[16] = file:/home/hudson/.m2/repository/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.jar
urls[17] = file:/home/hudson/.m2/repository/org/mortbay/jetty/jetty-util/6.1.5/jetty-util-6.1.5.jar
urls[18] = file:/home/hudson/.m2/repository/org/mortbay/jetty/servlet-api-2.5/6.1.5/servlet-api-2.5-6.1.5.jar
[FATAL ERROR] Container realm = plexus.core.maven
urls[0] = file:/home/hudson/.m2/repository/org/apache/maven/wagon/wagon-webdav/1.0-beta-2/wagon-webdav-1.0-beta-2.jar
urls[1] = file:/home/hudson/.m2/repository/slide/slide-webdavlib/2.1/slide-webdavlib-2.1.jar
urls[2] = file:/home/hudson/.m2/repository/commons-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar
urls[3] = file:/home/hudson/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
urls[4] = file:/home/hudson/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
urls[5] = file:/home/hudson/.m2/repository/de/zeigermann/xml/xml-im-exporter/1.1/xml-im-exporter-1.1.jar
urls[6] = file:/home/hudson/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[HUDSON] Archiving /mnt/tmp/workspace/jboss-cache-searchable-trunk-jdk1.6/./pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org/apache/maven/plugin/logging/Log
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/maven/plugin/logging/Log
at org.codehaus.mojo.javancss.NcssReportMojo.scanForSources(NcssReportMojo.java:373)
at org.codehaus.mojo.javancss.NcssReportMojo.canGenerateSingleReport(NcssReportMojo.java:347)
at org.codehaus.mojo.javancss.NcssReportMojo.canGenerateReport(NcssReportMojo.java:320)
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.filterReports(AbstractSiteRenderingMojo.java:421)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:77)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:136)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at hudson.maven.agent.Main.launch(Main.java:97)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:129)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:52)
at hudson.remoting.UserRequest.perform(UserRequest.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:23)
at hudson.remoting.Request$2.run(Request.java:200)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 3 seconds
[INFO] Finished at: Fri Aug 22 05:38:19 EDT 2008
[INFO] Final Memory: 47M/85M
[INFO] ------------------------------------------------------------------------
Waiting for Hudson to finish collecting data
15 years, 8 months
JBoss Cache SVN: r6599 - searchable/trunk/src/test/resources.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-08-22 05:27:44 -0400 (Fri, 22 Aug 2008)
New Revision: 6599
Modified:
searchable/trunk/src/test/resources/log4j.xml
Log:
Reduced default log levels
Modified: searchable/trunk/src/test/resources/log4j.xml
===================================================================
--- searchable/trunk/src/test/resources/log4j.xml 2008-08-22 09:17:57 UTC (rev 6598)
+++ searchable/trunk/src/test/resources/log4j.xml 2008-08-22 09:27:44 UTC (rev 6599)
@@ -63,15 +63,15 @@
<!-- ================ -->
<category name="org.jboss.cache.search">
- <priority value="TRACE"/>
+ <priority value="WARN"/>
</category>
<category name="org.hibernate.search">
- <priority value="TRACE"/>
+ <priority value="WARN"/>
</category>
<category name="org.jboss.cache">
- <priority value="INFO"/>
+ <priority value="WARN"/>
</category>
<category name="org.jboss.cache.factories">
15 years, 8 months
JBoss Cache SVN: r6598 - in searchable/trunk: assembly and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: navssurtani
Date: 2008-08-22 05:17:57 -0400 (Fri, 22 Aug 2008)
New Revision: 6598
Modified:
searchable/trunk/assembly/all.xml
searchable/trunk/assembly/bin.xml
searchable/trunk/pom.xml
Log:
Edited some xml files
Modified: searchable/trunk/assembly/all.xml
===================================================================
--- searchable/trunk/assembly/all.xml 2008-08-22 05:22:13 UTC (rev 6597)
+++ searchable/trunk/assembly/all.xml 2008-08-22 09:17:57 UTC (rev 6598)
@@ -55,6 +55,17 @@
</includes>
</fileSet>
+
+ <!--README-->
+ <fileSet>
+ <directory/>
+ <outputDirectory/>
+ <includes>
+ <include>README.txt</include>
+ </includes>
+ </fileSet>
+
+
<!-- docs -->
<fileSet>
<directory>target/site/apidocs</directory>
@@ -62,6 +73,7 @@
</fileSet>
</fileSets>
+
<!-- Make sure we filter out the junk that jboss-common-core pulls in -->
<dependencySets>
<dependencySet>
Modified: searchable/trunk/assembly/bin.xml
===================================================================
--- searchable/trunk/assembly/bin.xml 2008-08-22 05:22:13 UTC (rev 6597)
+++ searchable/trunk/assembly/bin.xml 2008-08-22 09:17:57 UTC (rev 6598)
@@ -35,6 +35,16 @@
</includes>
</fileSet>
+ <!--README.txt-->
+ <fileSet>
+ <directory/>
+ <outputDirectory/>
+ <includes>
+ <include>README.txt</include>
+ </includes>
+ </fileSet>
+
+
</fileSets>
<!-- Make sure we filter out the junk that jboss-common-core pulls in -->
Modified: searchable/trunk/pom.xml
===================================================================
--- searchable/trunk/pom.xml 2008-08-22 05:22:13 UTC (rev 6597)
+++ searchable/trunk/pom.xml 2008-08-22 09:17:57 UTC (rev 6598)
@@ -29,13 +29,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-pojo</artifactId>
- <version>2.2.0.CR5</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>3.1.0.Beta1</version>
@@ -65,9 +58,9 @@
</dependency>
<dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>2.3</version>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-pojo</artifactId>
+ <version>2.2.0.CR5</version>
<scope>test</scope>
</dependency>
15 years, 8 months
JBoss Cache SVN: r6597 - searchable.
by jbosscache-commits@lists.jboss.org
Author: navssurtani
Date: 2008-08-22 01:22:13 -0400 (Fri, 22 Aug 2008)
New Revision: 6597
Added:
searchable/1.0.0.BETA1/
Log:
Tagged beta 1
Copied: searchable/1.0.0.BETA1 (from rev 6596, searchable/trunk)
15 years, 8 months
JBoss Cache SVN: r6596 - in pojo/branches/2.2/src/main/docbook/userguide/en: modules and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2008-08-21 20:15:38 -0400 (Thu, 21 Aug 2008)
New Revision: 6596
Modified:
pojo/branches/2.2/src/main/docbook/userguide/en/master.xml
pojo/branches/2.2/src/main/docbook/userguide/en/modules/appendix.xml
pojo/branches/2.2/src/main/docbook/userguide/en/modules/architecture.xml
Log:
Update docs
Add array section
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/master.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/master.xml 2008-08-21 19:21:04 UTC (rev 6595)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/master.xml 2008-08-22 00:15:38 UTC (rev 6596)
@@ -18,8 +18,8 @@
<bookinfo>
<title>POJO Cache</title>
<subtitle>User Documentation</subtitle>
- <releaseinfo>Release 2.1.0.GA</releaseinfo>
- <pubdate>March 2008</pubdate>
+ <releaseinfo>Release 2.2.0.GA</releaseinfo>
+ <pubdate>October 2008</pubdate>
<author>
<firstname>Ben</firstname>
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/modules/appendix.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/modules/appendix.xml 2008-08-21 19:21:04 UTC (rev 6595)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/modules/appendix.xml 2008-08-22 00:15:38 UTC (rev 6596)
@@ -161,149 +161,29 @@
<title>PojoCache configuration xml</title>
<para>Attached is a full listing for <literal>pojocache-aop.xml</literal>.</para>
<programlisting role="XML"><![CDATA[
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- This is the PojoCache configuration file that specifies:
- 1. Interceptor stack for API
- 2. Annotation binding for POJO (via "prepare" element)
+<aop>
+ <!-- If a POJO has a Replicable annotation, it will be asepectized. -->
- Basically, this is a variant of jboss-aop.xml. Note that
- except for the customization of interceptor stack, you should
- not need to modify this file.
-
- To run PojoCache, you will need to define a system property:
- jboss.aop.path that contains the path to this file such that JBoss Aop
- can locate it.
+ <!--
+ Supports inheritance and polymorphism. It can either be a concrete class
+ or an interface. All sub-classes or interface implementors will be instrumeneted.
-->
- <aop>
+ <prepare expr="field(* $instanceof{(a)org.jboss.cache.pojo.annotation.Replicable}->*)" />
- <!--
- This defines the PojoCache 2.0 interceptor stack. Unless necessary, don't modify the stack here!
- -->
+ <!-- Work around that ensures annotated classes which do not access fields are instrumented -->
+ <introduction expr="class($instanceof{(a)org.jboss.cache.pojo.annotation.Replicable})"/>
- <!-- Check id range validity -->
- <interceptor name="CheckId" class="org.jboss.cache.pojo.interceptors.CheckIdInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Track Tx undo operation -->
- <interceptor name="Undo" class="org.jboss.cache.pojo.interceptors.PojoTxUndoInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Begining of interceptor chain -->
- <interceptor name="Start" class="org.jboss.cache.pojo.interceptors.PojoBeginInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Check if we need a local tx for batch processing -->
- <interceptor name="Tx" class="org.jboss.cache.pojo.interceptors.PojoTxInterceptor"
- scope="PER_INSTANCE"/>
-
- <!--
- Mockup failed tx for testing. You will need to set PojoFailedTxMockupInterceptor.setRollback(true)
- to activate it.
- -->
- <interceptor name="MockupTx" class="org.jboss.cache.pojo.interceptors.PojoFailedTxMockupInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Perform parent level node locking -->
- <interceptor name="TxLock" class="org.jboss.cache.pojo.interceptors.PojoTxLockInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Interceptor to perform Pojo level rollback -->
- <interceptor name="TxUndo" class="org.jboss.cache.pojo.interceptors.PojoTxUndoSynchronizationInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Interceptor to used to check recursive field interception. -->
- <interceptor name="Reentrant" class="org.jboss.cache.pojo.interceptors.MethodReentrancyStopperInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Whether to allow non-serializable pojo. Default is false. -->
- <interceptor name="MarshallNonSerializable"
- class="org.jboss.cache.pojo.interceptors.CheckNonSerializableInterceptor"
- scope="PER_INSTANCE">
- <attribute name="marshallNonSerializable">false</attribute>
- </interceptor>
-
- <!-- This defines the stack macro -->
- <stack name="Attach">
- <interceptor-ref name="Start"/>
- <interceptor-ref name="CheckId"/>
- <interceptor-ref name="MarshallNonSerializable"/>
- <interceptor-ref name="Tx"/>
- <!-- NOTE: You can comment this out during production although leaving it here is OK. -->
- <interceptor-ref name="MockupTx"/>
- <interceptor-ref name="TxLock"/>
- <interceptor-ref name="TxUndo"/>
- </stack>
-
- <stack name="Detach">
- <interceptor-ref name="Start"/>
- <interceptor-ref name="CheckId"/>
- <interceptor-ref name="Tx"/>
- <!-- NOTE: You can comment this out during production although leaving it here is OK. -->
- <interceptor-ref name="MockupTx"/>
- <interceptor-ref name="TxLock"/>
- <interceptor-ref name="TxUndo"/>
- </stack>
-
- <stack name="Find">
- <interceptor-ref name="Start"/>
- <interceptor-ref name="CheckId"/>
- </stack>
-
- <!--
- The following section should be READ-ONLY!! It defines the annotation binding to the stack.
- -->
-
- <!-- This binds the jointpoint to specific in-memory operations. Currently in PojoUtil. -->
- <bind pointcut="execution(*
- @org.jboss.cache.pojo.annotation.Reentrant->toString())">
- <interceptor-ref name="Reentrant"/>
- </bind>
-
- <bind pointcut="execution(*
- org.jboss.cache.pojo.PojoUtil->@org.jboss.cache.pojo.annotation.TxUndo(..))">
- <interceptor-ref name="Undo"/>
- </bind>
-
- <bind pointcut="execution(* org.jboss.cache.pojo.impl.PojoCacheImpl->@org.jboss.cache.pojo.annotation.Attach(..))">
- <stack-ref name="Attach"/>
- </bind>
-
- <bind pointcut="execution(* org.jboss.cache.pojo.impl.PojoCacheImpl->@org.jboss.cache.pojo.annotation.Detach(..))">
- <stack-ref name="Detach"/>
- </bind>
-
- <bind pointcut="execution(* org.jboss.cache.pojo.impl.PojoCacheImpl->@org.jboss.cache.pojo.annotation.Find(..))">
- <stack-ref name="Find"/>
- </bind>
-
-
- <!--
- Following is declaration for JDK50 annotation. You use the specific annotation on your
- POJO such that it can be instrumented. Idea is user will then need only to annotate like:
- @org.jboss.cache.pojo.annotation.Replicable
- in his POJO. There will be no need of jboss-aop.xml from user's side.
- -->
-
- <!-- If a POJO has PojoCachable annotation, it will be asepctized. -->
- <prepare expr="field(* $instanceof{(a)org.jboss.cache.pojo.annotation.Replicable}->*)" />
-
- <!-- Observer and Observable to monitor field modification -->
- <bind pointcut="
- set(* $instanceof{(a)org.jboss.cache.pojo.annotation.Replicable}->*)
- ">
- <interceptor class="org.jboss.cache.pojo.observable.SubjectInterceptor"/>
- </bind>
-
- <introduction class="$instanceof{(a)org.jboss.cache.pojo.annotation.Replicable}">
- <mixin>
- <interfaces>org.jboss.cache.pojo.observable.Subject</interfaces>
- <class>org.jboss.cache.pojo.observable.SubjectImpl</class>
- <construction>new org.jboss.cache.pojo.observable.SubjectImpl(this)</construction>
- </mixin>
- </introduction>
- </aop>
-
+ <!-- Array support -->
+ <!-- Comment entire section to disable -->
+ <arrayreplacement expr="class($instanceof{(a)org.jboss.cache.pojo.annotation.Replicable})"/>
+ <interceptor name="pojocache-array" class="org.jboss.cache.pojo.interceptors.dynamic.ArrayInterceptor"/>
+ <introduction expr="class($instanceof{(a)org.jboss.cache.pojo.annotation.Replicable})">
+ <interfaces>org.jboss.cache.pojo.impl.ArrayInterceptable</interfaces>
+ </introduction>
+ <arraybind name="pojocache-array" type="READ_WRITE">
+ <interceptor-ref name="pojocache-array"/>
+ </arraybind>
+</aop>
]]></programlisting>
</sect1>
</chapter>
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/modules/architecture.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/modules/architecture.xml 2008-08-21 19:21:04 UTC (rev 6595)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/modules/architecture.xml 2008-08-22 00:15:38 UTC (rev 6596)
@@ -19,86 +19,6 @@
</mediaobject>
</figure>
- <sect1>
- <title>POJO Cache interceptor stack</title>
-
- <para>As mentioned, the JBoss Aop framework is used to provide a configurable interceptor stack.
- In the current implementation, the main POJO Cache methods have their own independant stack. These are specified in <literal>META-INF/pojocache-aop.xml</literal>
- In most cases, this file should be left alone, although advanced users may wish to add their own interceptors.
- The Following is the default configuration:</para>
-<programlisting role="XML"><![CDATA[
- <!-- Check id range validity -->
- <interceptor name="CheckId" class="org.jboss.cache.pojo.interceptors.CheckIdInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Track Tx undo operation -->
- <interceptor name="Undo" class="org.jboss.cache.pojo.interceptors.PojoTxUndoInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Begining of interceptor chain -->
- <interceptor name="Start" class="org.jboss.cache.pojo.interceptors.PojoBeginInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Check if we need a local tx for batch processing -->
- <interceptor name="Tx" class="org.jboss.cache.pojo.interceptors.PojoTxInterceptor"
- scope="PER_INSTANCE"/>
-
- <!--
- Mockup failed tx for testing. You will need to set PojoFailedTxMockupInterceptor.setRollback(true)
- to activate it.
- -->
- <interceptor name="MockupTx" class="org.jboss.cache.pojo.interceptors.PojoFailedTxMockupInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Perform parent level node locking -->
- <interceptor name="TxLock" class="org.jboss.cache.pojo.interceptors.PojoTxLockInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Interceptor to perform Pojo level rollback -->
- <interceptor name="TxUndo" class="org.jboss.cache.pojo.interceptors.PojoTxUndoSynchronizationInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Interceptor to used to check recursive field interception. -->
- <interceptor name="Reentrant" class="org.jboss.cache.pojo.interceptors.MethodReentrancyStopperInterceptor"
- scope="PER_INSTANCE"/>
-
- <!-- Whether to allow non-serializable pojo. Default is false. -->
- <interceptor name="MarshallNonSerializable" class="org.jboss.cache.pojo.interceptors.CheckNonSerializableInterceptor"
- scope="PER_INSTANCE">
- <attribute name="marshallNonSerializable">false</attribute>
- </interceptor>
-
- <stack name="Attach">
- <interceptor-ref name="Start"/>
- <interceptor-ref name="CheckId"/>
- <interceptor-ref name="Tx"/>
- <interceptor-ref name="TxLock"/>
- <interceptor-ref name="TxUndo"/>
- </stack>
-
- <stack name="Detach">
- <interceptor-ref name="Start"/>
- <interceptor-ref name="CheckId"/>
- <interceptor-ref name="Tx"/>
- <interceptor-ref name="TxLock"/>
- <interceptor-ref name="TxUndo"/>
- </stack>
-
- <stack name="Find">
- <interceptor-ref name="Start"/>
- <interceptor-ref name="CheckId"/>
- </stack>
-]]></programlisting>
-<para>
- The stack should be self-explanatory. For example, for the <literal>Attach</literal> stack,
- we currently have <literal>Start, CheckId, Tx, TxLock</literal>, and
- <literal>TxUndo</literal> interceptors. The stack always starts with a
- <literal>Start</literal> interceptor such that initialization can be done properly.
- <literal>CheckId</literal> is to ensure the validity of the Id (e.g., it didn't use any internal
- Id string). Finally, <literal>Tx, TxLock</literal>, and <literal>TxUndo</literal> are handling the
- the proper transaction locking and rollback behavior (if needed).
-</para>
- </sect1>
<sect1>
<title>Field interception</title>
@@ -116,7 +36,7 @@
All access qualifiers are intercepted. In other words, all <literal>private</literal>, all <literal>protected</literal>, all default, and all <literal>public</literal> fields will be intercepted.
</listitem>
<listitem>
- Any field with <literal>final</literal>, <literal>static</literal>, and/or <literal>transient</literal> qualifiers, <emphasis role="bold">will be skipped</emphasis>. Therefore, they will not be replicated, passivated, or manipulated in any way by POJO Cache.
+ Any field with <literal>static</literal>, and/or <literal>transient</literal> qualifiers, <emphasis role="bold">will be skipped</emphasis>. Therefore, they will not be replicated, passivated, or manipulated in any way by POJO Cache.
</listitem>
</itemizedlist>
</para>
@@ -416,12 +336,9 @@
</listitem>
</itemizedlist>
- The drawback to this approach is that the calling application must re-get any collection references that were attached. Otherwise,
- the cache will not be aware of future changes. If the collection is referenced from another object, then the calling app can obtain
- the proxy by using the publishing mechanism provided by the object (e.g. Person.getHobbies()).
-
- If, however, the collection is directly attached to the cache, then a subsequent <literal>find()</literal> call will need to be made
- to retrieve the proxy.
+ The drawback to this approach is that the calling application must re-get any collection references that were directly attached. Otherwise,
+ the cache will not be aware of future changes. However, if the collection is referenced from an attached object, then this is transparently
+ handled. More specifically, the attached object will see the proxy instead of the original.
</para>
<para>The following code snippet illustrates obtaining a direct Collection proxy reference:
@@ -486,4 +403,51 @@
</itemizedlist>
</sect2>
</sect1>
+ <sect1>
+ <title>Array Mapping</title>
+
+ <para>As of 2.2, array fields of any attached object are updated transparently, provided that the array
+ is written/read from a class marked with <literal>@Replicable</literal>. If this is the case, only
+ the indexes of the array that are modified are replicated. However, if the array is passed externally
+ to a class that is not marked as <literal>@Replicable</literal>, then the changes will not be noticed. For this
+ reason, it is recommended to abstract access to the array where possible (i.e. setItem(item, index)).
+ If an external, non-replicable class needs access to the array, then it is recommended to pass a copy,
+ and add a method to the container object that reapplies the changes. Also, due to JVM limitations,
+ an array can not be monitored if it is directly attached to the cache (i.e. a first class object). POJO
+ Cache still allows this, but they are treated as a serializable type. As with other serializable type,
+ they must be reattached after every change.
+ </para>
+
+ <para>The following code snippet illustrates accessing a replicated array through abstraction:
+ </para>
+<programlisting role="JAVA"><![CDATA[
+@Replicable public class Team
+{
+ private String[] members = new String[10];
+
+ public String getMember(int index)
+ {
+ return members[index];
+ }
+
+ public void setMember(int index, String member)
+ {
+ members[index] = member;
+ }
+}
+
+public class SomeExternalClass
+{
+ ...
+ public void someMethod()
+ {
+ Team team = new Tesam();
+ cache.attach("/team/1", team);
+
+ team.setMember(0, "John");
+ team.setMember(1, "Joe");
+ }
+}
+]]></programlisting>
+ </sect1>
</chapter>
15 years, 8 months
JBoss Cache SVN: r6595 - in pojo/branches/2.2/src/main/docbook: userguide/en and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2008-08-21 15:21:04 -0400 (Thu, 21 Aug 2008)
New Revision: 6595
Modified:
pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml
pojo/branches/2.2/src/main/docbook/userguide/en/master.xml
pojo/branches/2.2/src/main/docbook/userguide/en/modules/api.xml
pojo/branches/2.2/src/main/docbook/userguide/en/modules/instrumentation.xml
Log:
Sync 2.2 docs with 2.1 changes
Modified: pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml 2008-08-21 17:33:17 UTC (rev 6594)
+++ pojo/branches/2.2/src/main/docbook/tutorial/en/master.xml 2008-08-21 19:21:04 UTC (rev 6595)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<article lang="en">
<articleinfo>
- <title>PojoCache Tutorial</title>
- <releaseinfo>Release 2.0.0</releaseinfo>
- <pubdate>June 2007</pubdate>
+ <title>POJO Cache Tutorial</title>
+ <releaseinfo>Release 2.1.0</releaseinfo>
+ <pubdate>March 2008</pubdate>
<author>
<firstname>Ben</firstname>
<surname>Wang</surname>
@@ -19,9 +19,9 @@
<section>
<title>Introduction</title>
- <para>PojoCache is an in-memory, transactional, and replicated POJO (plain old Java object) cache system that
+ <para>POJO Cache is an in-memory, transactional, and replicated POJO (plain old Java object) cache system that
allows users to operate on a POJO transparently without active user management of either replication or
- persistency aspects. This tutorial focuses on the usage of the PojoCache API.
+ persistency aspects. This tutorial focuses on the usage of the POJO Cache API.
</para>
<para>For details of configuration, usage and APIs, please refer to the
<ulink url="http://labs.jboss.org/portal/jbosscache/docs/index.html">users manual</ulink>.
@@ -33,7 +33,7 @@
<itemizedlist>
<listitem>
- <para>PojoCache creation and modification</para>
+ <para>POJO Cache creation and modification</para>
</listitem>
<listitem>
@@ -41,7 +41,7 @@
</listitem>
<listitem>
- <para>Using Collections in PojoCache</para>
+ <para>Using Collections in POJO Cache</para>
</listitem>
<listitem>
@@ -57,17 +57,17 @@
<para>First download the JBoss Cache 2.x distribution from
<ulink url="http://labs.jboss.org/portal/jbosscache/download/index.html">the download page</ulink>
. You probably want the
- <literal>JBossCache-pojo-2.X.Y.zip</literal>
+ <literal>jbosscache-pojo-2.X.Y.zip</literal>
distribution. Unzip it, and you will get a directory containing the distribution, such as
- <literal>JBossCache-pojo-2.X.Y</literal>
+ <literal>jbosscache-pojo-2.X.Y</literal>
.
For the sake of this tutorial, I will refer to this as
- <literal>PojoCache</literal>
+ <literal>POJO Cache</literal>
.
</para>
<para>The configuration files are located under the
- <literal>PojoCache/etc</literal>
+ <literal>jbosscache-pojo/etc</literal>
directory. You can modify the behavior of the underlying cache through editing the various configuration files.
</para>
@@ -89,8 +89,8 @@
<listitem>
<para>
<literal>pojocache-aop.xml</literal>
- . PojoCache configuration file that contains, amongst other things, the annotation to use on POJOs so
- that they're aspectised. For more information, please the PojoCache
+ . POJO Cache configuration file that contains, amongst other things, the annotation to use on POJOs so
+ that they're aspectised. For more information, please the POJO Cache
<ulink url="http://labs.jboss.org/portal/jbosscache/docs/index.html">users manual</ulink>
.
</para>
@@ -102,7 +102,7 @@
<title>Script</title>
<para>The only script needed for this tutorial is the
- <literal>PojoCache/build.xml</literal>
+ <literal>jbosscache-pojo/build.xml</literal>
ant script.
</para>
</section>
@@ -110,7 +110,7 @@
<section>
<title>Example POJOs</title>
- <para>The example POJO classes used for PojoCache demo are:
+ <para>The example POJO classes used for POJO Cache demo are:
<literal>org.jboss.cache.pojo.test.Person</literal>
and
<literal>org.jboss.cache.pojo.test.Address</literal>
@@ -212,7 +212,7 @@
<itemizedlist>
<listitem>
<literal>cache</literal>
- - a reference to the PojoCache interface, used by the GUI instance.
+ - a reference to the POJO Cache interface, used by the GUI instance.
</listitem>
<listitem>
<literal>transactionManager</literal>
@@ -234,14 +234,14 @@
<section>
<title>Tutorials</title>
It is recommended that you shut down and restart the demo GUI for each of the following tutorials, to ensure
- clean caches every time. To inspect POJO attribute changes via GUI, please refer to the PojoCache
+ clean caches every time. To inspect POJO attribute changes via GUI, please refer to the POJO Cache
<ulink
url="http://labs.jboss.org/portal/jbosscache/docs/index.html">user manual
</ulink>
to understand how the POJOs are mapped internally in the cache.
<section>
- <title>PojoCache API, POJO manipulation, and Replication</title>
+ <title>POJO Cache API, POJO manipulation, and Replication</title>
<para>
For this tutorial, start two instance of the demo GUI. In this tutorial, we will:
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/master.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/master.xml 2008-08-21 17:33:17 UTC (rev 6594)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/master.xml 2008-08-21 19:21:04 UTC (rev 6595)
@@ -18,8 +18,8 @@
<bookinfo>
<title>POJO Cache</title>
<subtitle>User Documentation</subtitle>
- <releaseinfo>Release 2.0.0</releaseinfo>
- <pubdate>July 2007</pubdate>
+ <releaseinfo>Release 2.1.0.GA</releaseinfo>
+ <pubdate>March 2008</pubdate>
<author>
<firstname>Ben</firstname>
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/modules/api.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/modules/api.xml 2008-08-21 17:33:17 UTC (rev 6594)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/modules/api.xml 2008-08-21 19:21:04 UTC (rev 6595)
@@ -1,13 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
<chapter id="api">
-
<title>API Overview</title>
- <para>This section provides a brief overview of the POJO Cache APIs. Please consult the javadoc for the full API.</para>
+ <para>
+ This section provides a brief overview of the POJO Cache APIs.
+ Please consult the javadoc for the full API.
+ </para>
+
<sect1>
<title>PojoCacheFactory Class</title>
- <para>PojoCacheFactory provides a couple of static methods to instantiate and obtain a PojoCache instance.</para>
-<programlisting role="JAVA"><![CDATA[
-/**
+
+ <para>
+ PojoCacheFactory provides a couple of static methods to
+ instantiate and obtain a PojoCache instance.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[/**
* Create a PojoCache instance. Note that this will start the cache life cycle automatically.
* @param config A configuration string that represents the file name that is used to
* configure the underlying Cache instance.
@@ -30,30 +38,31 @@
* @param start If true, it will start the cache life cycle.
* @return PojoCache
*/
-public static PojoCache createInstance(Configuration config, boolean start);
-]]></programlisting>
- <para>For example, to obtain a PojoCache instance and start the cache lifestyle automatically,
- we can do:</para>
-<programlisting role="JAVA"><![CDATA[
- String configFile = "META-INF/replSync-service.xml";
- PojoCache cache = PojoCacheFactory.createInstance(configFile);
-]]></programlisting>
- </sect1>
+public static PojoCache createInstance(Configuration config, boolean start);]]></programlisting>
+ <para>
+ For example, to obtain a PojoCache instance and start the cache
+ lifestyle automatically, we can do:
+ </para>
+ <programlisting role="JAVA"><![CDATA[String configFile = "META-INF/replSync-service.xml";
+PojoCache cache = PojoCacheFactory.createInstance(configFile);]]>
+ </programlisting>
+ </sect1>
<sect1>
<title>PojoCache Interface</title>
+
<para>
- <literal>PojoCache</literal> is the main interface for POJO Cache operations.
- Since most of the cache interaction is performed against the application domain model,
- there are only a few methods on this interface.
+ <literal>PojoCache</literal>
+ is the main interface for POJO Cache operations. Since most of the
+ cache interaction is performed against the application domain
+ model, there are only a few methods on this interface.
</para>
<sect2>
<title>Attachment</title>
-<programlisting role="JAVA"><![CDATA[
- /**
+ <programlisting role="JAVA"><![CDATA[/**
* Attach a POJO into PojoCache. It will also recursively put any sub-POJO into
* the cache system. A POJO can be the following and have the consequences when attached:
*
@@ -72,66 +81,84 @@
* @param id An id String to identify the object in the cache. To promote concurrency, we
* recommend the use of hierarchical String separating by a designated separator. Default
* is "/" but it can be set differently via a System property, jbosscache.separator
- * in the future release. E.g., "ben", or "student/joe", etc.
+ * in the future release. E.g., "/ben", or "/student/joe", etc.
* @param pojo object to be inserted into the cache. If null, it will nullify the fqn node.
* @return Existing POJO or null if there is none.
* @throws PojoCacheException Throws if there is an error related to the cache operation.
*/
- Object attach(String id, Object pojo) throws PojoCacheException;
-]]></programlisting>
+ Object attach(String id, Object pojo) throws PojoCacheException;]]></programlisting>
+
<para>
- As described in the above javadoc, this method "attaches" the passed object to the cache
- at the specified location (<literal>id</literal>).
- The passed in object (<literal>pojo</literal>) must have been instrumented (using the <literal>@Replicable</literal> annotation)
- or implement the <literal>Serializable</literal> interface.
+ As described in the above javadoc, this method "attaches" the
+ passed object to the cache at the specified location (
+ <literal>id</literal>
+ ). The passed in object (
+ <literal>pojo</literal>
+ ) must have been instrumented (using the
+ <literal>@Replicable</literal>
+ annotation) or implement the
+ <literal>Serializable</literal>
+ interface.
</para>
<para>
- If the object is not instrumented, but serializable, POJO Cache will simply treat it as an opaque "primitive" type. That is,
- it will simply store it without mapping the object's fields into the cache. Replication is done on the object wide
- level and therefore it will not be fine-grained.
+ If the object is not instrumented, but serializable, POJO Cache
+ will simply treat it as an opaque "primitive" type. That is, it
+ will simply store it without mapping the object's fields into
+ the cache. Replication is done on the object wide level and
+ therefore it will not be fine-grained.
</para>
- <para>If the object has references to other objects, this call will issue
- <literal>attach()</literal> calls
- recursively until the entire object graph is
- traversed. In addition, object identity and object references are preserved. So both circular and multiply referenced objects
- are mapped as expected.
+ <para>
+ If the object has references to other objects, this call will
+ issue
+ <literal>attach()</literal>
+ calls recursively until the entire object graph is traversed. In
+ addition, object identity and object references are preserved.
+ So both circular and multiply referenced objects are mapped as
+ expected.
</para>
- <para>The return value after the call is the previous object under <literal>id</literal>, if any. As a result, a successful call i
- will replace that old value with the new instance. Note that a user will only need to
- issue this call once for each top-level object. Further calls can be made directly on the graph, and they will be mapped as
+ <para>
+ The return value after the call is the previous object under
+ <literal>id</literal>
+ , if any. As a result, a successful call i will replace that old
+ value with the new instance. Note that a user will only need to
+ issue this call once for each top-level object. Further calls
+ can be made directly on the graph, and they will be mapped as
expected.
</para>
</sect2>
+
<sect2>
<title>Detachment</title>
-<programlisting role="JAVA"><![CDATA[
- /**
+ <programlisting role="JAVA"><![CDATA[/**
* Remove POJO object from the cache.
*
* @param id Is string that associates with this node.
* @return Original value object from this node.
* @throws PojoCacheException Throws if there is an error related to the cache operation.
*/
- Object detach(String id) throws PojoCacheException;
-]]></programlisting>
+ Object detach(String id) throws PojoCacheException;]]></programlisting>
<para>
- This call will detach the POJO from the cache by removing the contents under <literal>id</literal>
- and return the POJO instance stored there (null if it doesn't exist). If successful, further operations against
- this object will not affect the cache.
- Note this call will also remove everything stored under <literal>id</literal> even if you have put
- other plain cache data there.
+ This call will detach the POJO from the cache by removing the
+ contents under
+ <literal>id</literal>
+ and return the POJO instance stored there (null if it doesn't
+ exist). If successful, further operations against this object
+ will not affect the cache. Note this call will also remove
+ everything stored under
+ <literal>id</literal>
+ even if you have put other plain cache data there.
</para>
</sect2>
<sect2>
<title>Query</title>
-<programlisting role="JAVA"><![CDATA[
- /**
+
+ <programlisting role="JAVA"><![CDATA[/**
* Retrieve POJO from the cache system. Return null if object does not exist in the cache.
* Note that this operation is fast if there is already a POJO instance attached to the cache.
*
@@ -139,21 +166,21 @@
* @return Current content value. Null if does not exist.
* @throws PojoCacheException Throws if there is an error related to the cache operation.
*/
- Object find(String id) throws PojoCacheException;
-]]></programlisting>
+ Object find(String id) throws PojoCacheException;]]></programlisting>
+
<para>
-This call will
- return the current object content located under
- <literal>id</literal>. This method call is useful when you don't have the exact POJO reference.
- For example, when you fail over to the
- replicated node, you want to get the object reference from the replicated cache instance.
- In this case, PojoCache will create a new Java object if it does not exist and
- then add the cache interceptor such that every future access will be
- in sync with the underlying cache store.
+ This call will return the current object content located under
+ <literal>id</literal>
+ . This method call is useful when you don't have the exact POJO
+ reference. For example, when you fail over to the replicated
+ node, you want to get the object reference from the replicated
+ cache instance. In this case, PojoCache will create a new Java
+ object if it does not exist and then add the cache interceptor
+ such that every future access will be in sync with the
+ underlying cache store.
</para>
-<programlisting role="JAVA"><![CDATA[
- /**
+ <programlisting role="JAVA"><![CDATA[/**
* Query all managed POJO objects under the id recursively. Note that this will not return
* the sub-object POJOs, e.g., if Person has a sub-object of Address, it
* won't return Address pojo. Also note also that this operation is not thread-safe
@@ -164,19 +191,110 @@
* @return Map of all POJOs found with (id, POJO) pair. Return size of 0, if not found.
* @throws PojoCacheException Throws if there is an error related to the cache operation.
*/
- Map findAll(String id) throws PojoCacheException;
-]]></programlisting>
+ Map findAll(String id) throws PojoCacheException;]]></programlisting>
<para>
-This call will return all the managed POJOs under cache with a base Fqn name. It is recursive, meaning that
- it will traverse all the sub-trees to find the POJOs under that base. For example, if you specify
- the fqn to be root, e.g.,
+ This call will return all the managed POJOs under cache with a
+ base Fqn name. It is recursive, meaning that it will traverse
+ all the sub-trees to find the POJOs under that base. For
+ example, if you specify the fqn to be root, e.g.,
<code>"/"</code>
- , then it will return all the
- managed POJOs under the cache.
+ , then it will return all the managed POJOs under the cache.
</para>
</sect2>
-
</sect1>
+ <sect1>
+ <title>POJO Annotations</title>
+
+ <para>
+ There are currently three annotations that can be used on attached
+ objects in POJO Cache:
+ <literal>@Replicable</literal>
+ ,
+ <literal>@Transient</literal>
+ , and
+ <literal>@Serializable</literal>
+ . All of which affect how the annotated object is replicated.
+ </para>
+
+ <sect2>
+ <title>@Replicable annotation</title>
+
+ <para>
+ The
+ <literal>@org.jboss.cache.annotation.Replicable</literal>
+ annotation is used to mark classes for instrumentation. Once
+ instrumented, individual field changes can be replicated
+ separately. See the instrumentation chapter for more information
+ on this process.
+ </para>
+
+ <para>
+ The following example will replicate changes to resource and
+ name separately:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Replicable
+public class Gadget
+{
+ private Resource resource;
+ private String name;
+}]]> </programlisting>
+ </sect2>
+
+ <sect2>
+ <title>@Transient annotation</title>
+
+ <para>
+ The <literal>@org.jboss.cache.annotation.Transient</literal> annotation is used to
+ indicate that a field should not be replicable. This allows
+ non-transient fields to be included in normal Java serialization
+ output, but not when replicated by POJO Cache.
+ </para>
+
+ <para>
+ The following object will not replicate changes to resource.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Replicable
+public class Gadget
+{
+ // resource won't be replicated
+ @Transient
+ private Resource resource;
+} ]]></programlisting>
+
+ </sect2>
+
+ <sect2>
+ <title>@Serializable annotation</title>
+
+ <para>
+ The
+ <literal>@org.jboss.cache.annotation.Serializable</literal>
+ annotation indicates a field should be treated as a serialized
+ attribute. This, of course, requires that the type of the field
+ implement
+ <literal>Serializable</literal>
+ . If the marked field type has an @Replicable annotation, it
+ will be ignored.
+ <literal></literal>
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Replicable
+public class Gadget
+{
+ // resource won't be replicated
+ @Transient
+ private Resource resource;
+
+ // serialized even if SpecialAddress is @Replicable
+ @Serializable
+ private SpecialAddress specialAddress;
+
+ // other state variables
+}]]> </programlisting>
+ </sect2>
+ </sect1>
</chapter>
Modified: pojo/branches/2.2/src/main/docbook/userguide/en/modules/instrumentation.xml
===================================================================
--- pojo/branches/2.2/src/main/docbook/userguide/en/modules/instrumentation.xml 2008-08-21 17:33:17 UTC (rev 6594)
+++ pojo/branches/2.2/src/main/docbook/userguide/en/modules/instrumentation.xml 2008-08-21 19:21:04 UTC (rev 6595)
@@ -2,94 +2,136 @@
<chapter id="instrumentation">
<title>Instrumentation</title>
- <para>In order to store an object in POJO Cache, it must be either
- instrumented or made serializable. Instrumentation is the most optimal
- approach since it preserves object identity and provides field granular
- replication. POJO Cache currently uses the JBoss AOP project to provide
- instrumentation, so the same processes described in the AOP documentation
- are used with POJO Cache.</para>
+ <para>
+ In order to store an object in POJO Cache, it must be either
+ instrumented or made serializable. Instrumentation is the most
+ optimal approach since it preserves object identity and provides
+ field granular replication. POJO Cache currently uses the JBoss AOP
+ project to provide instrumentation, so the same processes described
+ in the AOP documentation are used with POJO Cache.
+ </para>
- <para>The primary input to JBoss AOP is the AOP binding file, which is
- responsible for specifying which classes should be instrumented. POJO Cache
- provides a binding file, <literal>pojocache-aop.xml</literal> , which
- matches all classes that have been annotated with the
- <literal>@Replicable</literal> annotation. Advanced users may choose to
- alter this definition to instrument classes in other various interesting
- ways. However, it is recommended to just stick with the default annotation
- binding.</para>
+ <para>
+ The primary input to JBoss AOP is the AOP binding file, which is
+ responsible for specifying which classes should be instrumented.
+ POJO Cache provides a binding file,
+ <literal>pojocache-aop.xml</literal>
+ , which matches all classes that have been annotated with the
+ <literal>@Replicable</literal>
+ annotation. Advanced users may choose to alter this definition to
+ instrument classes in other various interesting ways. However, it is
+ recommended to just stick with the default annotation binding.
+ </para>
- <para>The instrumentation process can be executed at either load-time, or
- compile-time. Load-time instrumentation uses a Java agent to intercept and
- modify classes as they are loaded; whereas compile-time instrumentation
- requires running <literal>aopc</literal> as part of the compilation
- process.</para>
+ <para>
+ The instrumentation process can be executed at either load-time, or
+ compile-time. Load-time instrumentation uses a Java agent to
+ intercept and modify classes as they are loaded; whereas
+ compile-time instrumentation requires running
+ <literal>aopc</literal>
+ as part of the compilation process.
+ </para>
<note>
- <para>Load-time is the recommended approach, since compile-time
- instrumentation adds hard dependencies to the weaved bytecode which ties
- the output to a particular version of JBoss AOP.</para>
+ <para>
+ Load-time is the recommended approach, since compile-time
+ instrumentation adds hard dependencies to the weaved bytecode
+ which ties the output to a particular version of JBoss AOP.
+ </para>
</note>
<sect1>
<title>Load-time instrumentation</title>
- <para>Load-time instrumentation uses a Java agent to intercept all classes
- loaded by the JVM. As they are loaded JBoss AOP instruments them, allowing
- POJO Cache to monitor field changes. To enable load time instrumentation
- the JVM must be started with the following specified:</para>
+ <para>
+ Load-time instrumentation uses a Java agent to intercept all
+ classes loaded by the JVM. As they are loaded JBoss AOP
+ instruments them, allowing POJO Cache to monitor field changes. To
+ enable load time instrumentation the JVM must be started with the
+ following specified:
+ </para>
<orderedlist>
<listitem>
- <para>The <literal>jboss.aop.path</literal> system property set to the
- location of <literal>pojocache-aop.xml</literal></para>
+ <para>
+ The
+ <literal>jboss.aop.path</literal>
+ system property set to the location of
+ <literal>pojocache-aop.xml</literal>
+ </para>
</listitem>
<listitem>
- <para>A javaagent argument which includes
- <emphasis>jboss-aop-jdk50.jar</emphasis></para>
+ <para>
+ A javaagent argument which includes
+ <emphasis>jboss-aop-jdk50.jar</emphasis>
+ </para>
</listitem>
</orderedlist>
- <para>These requirements lead to the following example ant task:</para>
+ <para>
+ These requirements lead to the following example ant task:
+ </para>
- <programlisting role="XML"><![CDATA[
-<java classname="Foo" fork="yes">
+ <programlisting role="XML"><![CDATA[<java classname="Foo" fork="yes">
<jvmarg value="-javaagent:lib/jboss-aop.jar"/>
<jvmarg value="-Djboss.aop.path=etc/META-INF/pojocache-aop.xml"/>
<classpath refid="test.classpath"/>
-</java>
+</java>]]></programlisting>
+
+ <para>
+ There is also a
+ <emphasis>pojo-run</emphasis>
+ command line script in the POJO Cache distribution that passes the
+ proper arguments to the JVM for you.
+ </para>
+
+ <programlisting role="XML"><![CDATA[$ pojo-run -classpath myclasses org.foo.Bar
]]></programlisting>
- <para>Once the JVM is executed in this manner, any class with the
- <literal>@Replicable</literal> annotation will be instrumented when it is
- loaded.</para>
+ <para>
+ Once the JVM is executed in this manner, any class with the
+ <literal>@Replicable</literal>
+ annotation will be instrumented when it is loaded.
+ </para>
</sect1>
<sect1>
<title>Compile-time instrumentation</title>
- <para>While load-time is the preffered approach, it is also possible to
- instrument classes at compile-time. To do this, the aopc tool is used,
- with the following requirements:</para>
+ <para>
+ While load-time is the preferred approach, it is also possible to
+ instrument classes at compile-time. To do this, the aopc tool is
+ used, with the following requirements:
+ </para>
<orderedlist>
<listitem>
- <para>The <literal>aoppath</literal> option must point to the location
- of pojocache-aop.xml</para>
+ <para>
+ The
+ <literal>aoppath</literal>
+ option must point to the location of pojocache-aop.xml
+ </para>
</listitem>
<listitem>
- <para>The <literal>src</literal> option must point to the location of
- your class files that are to be instrumented. This is typically the
- output folder of a <literal>javac</literal> run.</para>
+ <para>
+ The
+ <literal>src</literal>
+ option must point to the location of your class files that are
+ to be instrumented. This is typically the output folder of a
+ <literal>javac</literal>
+ run.
+ </para>
</listitem>
</orderedlist>
- <para>The following is an example ant task which performs compile-time
- instrumentation:</para>
+ <para>
+ The following is an example ant task which performs compile-time
+ instrumentation:
+ </para>
- <programlisting role="XML"><![CDATA[
-<taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="aop.classpath"/>
+ <programlisting role="XML"><![CDATA[<taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="aop.classpath"/>
<target name="aopc" depends="compile" description="Precompile aop class">
<aopc compilerclasspathref="aop.classpath" verbose="true">
<src path="${build}"/>
@@ -98,231 +140,47 @@
<classpath path="${build}"/>
<classpath refid="lib.classpath"/>
</aopc>
-</target>
-]]></programlisting><para>In this example, once the aopc target
- is executeed the clasess in the build directory are modified. They can
- then be packaged in a jar and loaded using the normal Java
- mechanisms.</para>
- </sect1>
+</target>]]></programlisting>
- <sect1>
- <title>Understanding the provided AOP descriptor</title>
-
- <para>The advanced user might decide to alter the provided AOP descritor.
- In order to do this, it is important to understand the reaons behind what
- is provided, and what is required by POJO Cache. Previous sections have
- mentioned that any class with the <literal>@Replicable</literal>
- annotation will be instrumented. This happens, because the provided AOP
- descriptor, <literal>pojocache-aop.xml</literal>, has a perpare statement
- which matches any class (or subclass) using the annotation. This is shown
- in the following snippet:</para>
-
- <programlisting role="XML"><![CDATA[
-<prepare expr="field(* $instanceof{(a)org.jboss.cache.pojo.annotation.Replicable}->*)"/>
-]]></programlisting>
-
- <para>More specifically, any code which accesses a field on a class which
- has been annotated with <literal>@Replicable</literal>, will be
- instrumented: The "field" pointcut in the expression matches both read and
- write operations. The wildcard "*" indicates that all java protection
- modes are intercepted (private, package, protected, public). The
- <literal>$instanceof</literal> expression refers to any annotation that
- subclasses <literal>@Replicable</literal>. Finally, the ending wildcard
- allows the matched field to have any name.</para>
- </sect1>
-
- <sect1>
- <title>Annotation</title>
-
- <para>Annotation is a new feature in Java 5.0 that when declared can
- contain metadata at compile and run time. It is well suited for aop
- declaration since there will be no need for external metadata xml
- descriptor.</para>
-
- <sect2>
-
-
- <title>POJO annotation for instrumentation</title>
-
-
-
- <para>To support annotation (in order to simplify user's development
- effort), the JBoss Cache distribution ships with a
- <literal>pojocache-aop.xml</literal> under the
- <literal>resources</literal> directory. For reference, here is
- annotation definition from <literal>pojocache-aop.xml</literal> again :
+ <para>
+ In this example, once the aopc target is executed the classes in
+ the build directory are modified. They can then be packaged in a
+ jar and loaded using the normal Java mechanisms.
</para>
- <programlisting role="XML"><![CDATA[
-<aop>
- <prepare expr="field(*(a)org.jboss.cache.pojo.annotation.Replicable->*)"/>
-</aop>
- ]]></programlisting><para>Basically, it simply states that any annotation
- with both marker interfaces will be "aspectized" accordingly.</para>
-
-
-
- <para>Here is a code snippet that illustrate the declaration:</para>
-
-
-
- <programlisting role="JAVA"><![CDATA[
-(a)org.jboss.cache.pojo.annotation.Replicable public class
-Person {...}
- ]]></programlisting>
-
- The above declaration will instrument the class
-
- <literal>Person</literal>
-
- and all of its sub-classes. That is, if
-
- <literal>Student</literal>
-
- sub-class from
-
- <literal>Personal</literal>
-
- , then it will get instrumented automatically without further annotation declaration.
- </sect2>
-
- <sect2>
- <title>JDK5.0 field level annotations</title>
-
- <para>In Release 2.0, we have added two additional field level
- annotations for customized behavior. The first one is
- <code>@org.jboss.cache.pojo.annotation.Transient</code> . When applied
- to a field variable, it has the same effect as the Java language
- <code>transient</code> keyword. That is, PojoCache won't put this field
- into cache management (and therefore no replication).</para>
-
- <para>The second one is <code>
- @org.jboss.cache.pojo.annotation.Serializable </code> , when applied to
- a field variable, PojoCache will treat this variable as
- <code>Serializable</code> , even when it is <code>Replicable</code> .
- However, the field will need to implement the <code>Serializable</code>
- interface such that it can be replicated.</para>
-
- <para>Here is a code snippet that illustrates usage of these two
- annotations. Assuming that you have a Gadget class: </para>
- <programlisting role="JAVA"><![CDATA[
-public class Gadget
-{
- // resource won't be replicated
- @Transient
- Resource resource;
-
- // specialAddress is treated as a Serializable object but still has object relationship
- @Serializable
- SpecialAddress specialAddress;
-
- // other state variables
-}
- ]]></programlisting><para>Then when we do:</para><programlisting role="JAVA"><![CDATA[
- Gadget gadget = new Gadget();
- Resource resource = new Resource();
- SpecialAddress specialAddress = new SpecialAddress();
-
- // setters
- gadget.setResource(resource);
- gadget.setSpecialAddress(specialAddress);
-
- // put into PojoCache management
- cache1.putObject("/gadget", gadget);
-
- // retrieve it from another cache instance
- Gadget g2 = (Gadget) cache2.getObject("/gadget");
-
- // This is should be null because of @Transient tag so it is not replicated.
- g2.getResource();
-
- SepcialAddress d2 = g2.getSpecialAddress();
- d2.setName("inet"); // This won't get replicated automatically because of @Serializable tag
- ge.setSpecialAddress(d2); // Now this will.
- ]]></programlisting>
- </sect2>
</sect1>
<sect1>
- <title>Weaving</title>
+ <title>Understanding the provided AOP descriptor</title>
- <para>As already mentioned, a user can use the aop precompiler (
- <literal>aopc</literal> ) to precompile the POJO classes such that, during
- runtime, there is no additional system class loader needed. The
- precompiler will read in <literal>pojocache-aop.xml</literal> and weave
- the POJO byte code at compile time. This is a convenient feature to make
- the aop less intrusive.</para>
+ <para>
+ The advanced user might decide to alter the provided AOP
+ descriptor. In order to do this, it is important to understand the
+ reasons behind what is provided, and what is required by POJO
+ Cache. Previous sections have mentioned that any class with the
+ <literal>@Replicable</literal>
+ annotation will be instrumented. This happens, because the
+ provided AOP descriptor,
+ <literal>pojocache-aop.xml</literal>
+ , has a prepare statement which matches any class (or subclass)
+ using the annotation. This is shown in the following snippet:
+ </para>
- <para>Below is an Ant snippet that defines the library needed for the
- various Ant targets that we are listing here. User can refer to the
- <literal>build.xml</literal> in the distribution for full details.
- </para>
- <programlisting role="XML"><![CDATA[
-<path id="aop.classpath">
- <fileset dir="${lib}">
- <include name="**/*.jar" />
- <exclude name="**/jboss-cache.jar" />
- <exclude name="**/j*unit.jar" />
- <exclude name="**/bsh*.jar" />
- </fileset>
-</path>
+ <programlisting role="XML"><![CDATA[<prepare expr="field(* $instanceof{(a)org.jboss.cache.pojo.annotation.Replicable}->*)"/>
]]></programlisting>
- <sect2>
- <title>Ant target for running load-time instrumentation using
- specialized class loader</title>
-
- <para>In JDK5.0, you can use the <code>javaagent</code> option that does
- not require a separate Classloader. Here are the ant snippet from
- <code>one-test-pojo</code> , for example.</para>
- <programlisting role="XML"><![CDATA[
-<target name="one.test.pojo" depends="compile" description="run one junit test case.">
- <junit printsummary="yes" timeout="${junit.timeout}" fork="yes">
- <jvmarg value="-Djboss.aop.path=${output}/resources/pojocache-aop.xml"/>
- <jvmarg value="-javaagent:${lib}/jboss-aop-jdk50.jar"/>
- <classpath path="${output}/etc" />
- <sysproperty key="log4j.configuration" value="file:${output}/etc/log4j.xml" />
- <classpath refid="lib.classpath"/>
- <classpath refid="build.classpath"/>
- <formatter type="xml" usefile="true"/>
- <test name="${test}" todir="${reports}"/>
- </junit>
-</target>
- ]]></programlisting>
- </sect2>
-
- <sect2>
- <title>Ant target for aopc</title>
-
- <para>Below is the code snippet for the <literal>aopc</literal> Ant
- target. Running this target will do compile-time weaving of the POJO
- classes specified.</para>
-
- <programlisting role="XML"><![CDATA[
-<taskdef name="aopc" classname="org.jboss.aop.ant.AopC" classpathref="aop.classpath"/>
-<target name="aopc" depends="compile" description="Precompile aop class">
- <aopc compilerclasspathref="aop.classpath" verbose="true">
- <src path="${build}"/>
- <include name="org/jboss/cache/aop/test/**/*.class"/>
- <aoppath path="${output}/resources/pojocache-aop.xml"/>
- <classpath path="${build}"/>
- <classpath refid="lib.classpath"/>
- </aopc>
-</target>
- ]]></programlisting>
-
- <para>Below is a snapshot of files that are generated when aopc is
- applied. Notice that couple extra classes have been generated because of
- <literal>aopc</literal> .</para>
-
- <figure>
- <title>Classes generated after aopc</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/classes.png" />
- </imageobject>
- </mediaobject>
- </figure>
- </sect2>
+ <para>
+ More specifically, any code which accesses a field on a class
+ which has been annotated with
+ <literal>@Replicable</literal>
+ , will be instrumented: The "field" pointcut in the expression
+ matches both read and write operations. The wildcard "*" indicates
+ that all java protection modes are intercepted (private, package,
+ protected, public). The
+ <literal>$instanceof</literal>
+ expression refers to any annotation that subclasses
+ <literal>@Replicable</literal>
+ . Finally, the ending wildcard allows the matched field to have
+ any name.
+ </para>
</sect1>
</chapter>
\ No newline at end of file
15 years, 8 months