You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/01/26 18:33:23 UTC
svn commit: r1236310 -
/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.java
Author: hlship
Date: Thu Jan 26 17:33:22 2012
New Revision: 1236310
URL: http://svn.apache.org/viewvc?rev=1236310&view=rev
Log:
Extend JavaDoc to explain when this annotation would be used
Modified:
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.java
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.java?rev=1236310&r1=1236309&r2=1236310&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.java Thu Jan 26 17:33:22 2012
@@ -1,4 +1,4 @@
-// Copyright 2009 The Apache Software Foundation
+// Copyright 2009, 2012 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -28,11 +28,15 @@ import java.lang.annotation.*;
* <p/>
* Service decoration includes the decoration mechanism (from Tapestry 5.0) and the newer service advice mechanism (from
* Tapestry 5.1).
+ * <p/>
+ * Generally, services that are used to advise or decorate other services (such as {@link org.apache.tapestry5.ioc.services.LoggingAdvisor}
+ * or {@link org.apache.tapestry5.ioc.services.OperationAdvisor}) should include this annotation, to prevent a recursive service build
+ * when they attempt to advise themselves.
*
* @see org.apache.tapestry5.ioc.def.ServiceDef2#isPreventDecoration()
* @since 5.1.0.0
*/
-@Target({ ElementType.TYPE, ElementType.METHOD })
+@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@UseWith(AnnotationUseContext.SERVICE)