onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject svn commit: r1456592 - in /incubator/onami/trunk/lifecycle/warmup/src/site: apt/index.apt.vm site.xml
Date Thu, 14 Mar 2013 18:21:48 GMT
Author: randgalt
Date: Thu Mar 14 18:21:48 2013
New Revision: 1456592

URL: http://svn.apache.org/r1456592
Log:
Added doc

Modified:
    incubator/onami/trunk/lifecycle/warmup/src/site/apt/index.apt.vm
    incubator/onami/trunk/lifecycle/warmup/src/site/site.xml

Modified: incubator/onami/trunk/lifecycle/warmup/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/lifecycle/warmup/src/site/apt/index.apt.vm?rev=1456592&r1=1456591&r2=1456592&view=diff
==============================================================================
--- incubator/onami/trunk/lifecycle/warmup/src/site/apt/index.apt.vm (original)
+++ incubator/onami/trunk/lifecycle/warmup/src/site/apt/index.apt.vm Thu Mar 14 18:21:48 2013
@@ -24,7 +24,7 @@
 ~~ under the License.
 ~~
 
-Welcome to ${project.name}!
+Welcome to Apache Onami-Lifecycle Warm Up!
 
  Methods annotated with @WarmUp will be called in parallel
  (using the Java Fork-Join framework). Object
@@ -40,7 +40,7 @@ Welcome to ${project.name}!
 
 Before starting
 
-  ${project.name} is available on the Maven Central repo, you just need to add the dependency
below in your <<<pom.xml>>> file:
+  Lifecycle Warm Up is available on the Maven Central repo, you just need to add the dependency
below in your <<<pom.xml>>> file:
 
 +--------------------------------------+
 <dependencies>
@@ -65,3 +65,24 @@ Injector injector = Guice.createInjector
 Stager<WarmUp> warmUpStager = injector.get( LifeCycleStageModule.key(WarmUp.class)
);
 warmUpStager.stage(); // causes all injected object's @WarmUp methods to get called
 +--------------------------------------+
+
+ Of course, instead of getting the stager from the injector you can declare it as a dependency:
+
++--------------------------------------+
+public class MyClass
+{
+    private final Stager<WarmUp> stager;
+
+    @Inject
+    public MyClass(Stager<WarmUp> stager)
+    {
+        this.stager = stager;
+    }
+
+    @AfterInjection
+    public void start()
+    {
+        stager.stage();
+    }
+}
++--------------------------------------+

Modified: incubator/onami/trunk/lifecycle/warmup/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/lifecycle/warmup/src/site/site.xml?rev=1456592&r1=1456591&r2=1456592&view=diff
==============================================================================
--- incubator/onami/trunk/lifecycle/warmup/src/site/site.xml (original)
+++ incubator/onami/trunk/lifecycle/warmup/src/site/site.xml Thu Mar 14 18:21:48 2013
@@ -19,7 +19,7 @@
 -->
 <project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
-         name="${project.name}">
+         name="Apache Onami-Lifecycle Warm Up">
 
   <body>
     <head>



Mime
View raw message