This sample is a part of the Terracotta Framework Library - tclib. More information is available from the Terracotta Framework Library readme.html.
This application implements a clustered classloader sample. More information on the creation of this sample can be found on Taylor Gautier's Technical Java Blog java.think():
This sample application requires Maven 2 and Java 5. First download and install Maven 2. Then perform these steps:
To demonstrate the clusterclassloader, two projects are required, so that isolation of the classloader hierarchy from one project to the next is clearly demonstrated.
$ cd sample1
$ mvn tc:start
$ mvn tc:run
[INFO] [node] Putting one work item... [INFO] Finished node node [INFO] DSO processes finished [INFO] Skipping stopping DSO Server [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26 seconds [INFO] Finished at: Sun Jun 22 12:56:21 PDT 2008 [INFO] Final Memory: 14M/29M [INFO] ------------------------------------------------------------------------
$ cd ../sample2
$ mvn tc:run
[INFO] [node] Waiting for work...(press Ctrl-C to stop) [INFO] [node] This is Callable2 calling! [INFO] [node] Waiting for work...(press Ctrl-C to stop) ^CDestroying 1 processes Destroyed 1 processes [INFO] Finished node node [INFO] DSO processes finished [INFO] Skipping stopping DSO Server [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27 seconds [INFO] Finished at: Sun Jun 22 12:58:59 PDT 2008