tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tveron...@apache.org
Subject [4/9] tomee git commit: Some text fixed to read better
Date Mon, 26 Nov 2018 15:02:19 GMT
Some text fixed to read better


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/34673bd5
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/34673bd5
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/34673bd5

Branch: refs/heads/master
Commit: 34673bd57ae09006bcfef5e835ab52d4c612265e
Parents: 0c7d0f8
Author: Richard Monson-Haefel <Richard@Uncommon-Design.com>
Authored: Wed Nov 21 07:14:41 2018 -0600
Committer: Richard Monson-Haefel <Richard@Uncommon-Design.com>
Committed: Wed Nov 21 07:14:41 2018 -0600

----------------------------------------------------------------------
 examples/cdi-interceptors/README.md | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/34673bd5/examples/cdi-interceptors/README.md
----------------------------------------------------------------------
diff --git a/examples/cdi-interceptors/README.md b/examples/cdi-interceptors/README.md
index 31325d8..1263915 100644
--- a/examples/cdi-interceptors/README.md
+++ b/examples/cdi-interceptors/README.md
@@ -82,24 +82,21 @@ Lets quickly put up a `beans.xml` file like the following in `src/main/resources
     </beans>
 
 
-By default, a bean archive has no enabled interceptors bound via interceptor
-bindings. An interceptor must be explicitly enabled by listing its class
+By default, a bean archive has no enabled interceptors; an interceptor must be explicitly
enabled by listing its class
 in the `beans.xml`.
 
-Those lines in `beans.xml` not only "enable" the interceptors, but also define the "order
of execution" of the interceptors.
-
-The order in with a method is annotated has no real significance.
+The order of the interceptor annotations has no real significance.
 Eg:
 
     @TimeRestrict
     @Log
     void cMethod(){}
 
-Here the `BookForAShowLoggingInterceptor` would be applied first and then `TimeBasedRestrictingInterceptor`
+It is the `interceptor` elements in `beans.xml` that not only "enable" the interceptors,
but also define the "order of execution" of the interceptors. In this case the `BookForAShowLoggingInterceptor`
would be applied first and then `TimeBasedRestrictingInterceptor`
 
-So now you know that the order is only determined by the order of definition in `beans.xml`.
Interceptors which occur earlier in the list are called first.
+So now you know that the order is only determined by the order within the `interceptors`
element within the `beans.xml`. The rule is simple, interceptors which occur earlier in the
list are called first.
 
-Also note that a method can be marked for interception by multiple interceptors by applying
multiple annotations as above.
+Also note that a method can be marked for interception using multiple interceptors by applying
multiple annotations as above.
 
 This brings us to another question. In the above case there were two interceptors applied
together. What if I would require about 4 such interceptors that would go along.... Having
to annotate so much makes the code a little clumsy?
 


Mime
View raw message