This is an example that illustrates using PojoCache to replicate
over a cluster state information about students and the courses they take.
Note that you will need to use JDK50 to run this example!

We will use JDK50 POJO Cache annotation for illustration where
the necessary domain model classes have been annotated with
@org.jboss.cache.aop.annotation.PojoCacheable and
@@org.jboss.cache.aop.annotation.InstanceOfPojoCacheable annotations.

You can run either using loadtime mode ("run.loadtime.example"), meaning there is
no need for pre-compilation once you have annotated your POJOs, or using
compilation mode ("run.aop.example") where another Ant target "aopc" has
been invoked first (defined in PojoCacheTasks.xml).

The example involves 4 domain model classes, Person, Student, Address
and Course.  Student is a subclass of Person.  A Person has an Address, while
a Student can be registered for 0 or more Courses.

The class test.examples.StudentMaintTest:

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.

You can run the example through Ant.

1. Run "build.bat compile" to do a standard Java compilation.

2. Run "build.bat run.aop.example" (or run.loadtime.example) to run the example.
The run.aop.example Ant target depends on "aopc", so calling it will cause
"compile" and "aopc" to run as well.

