From weld-commits at lists.jboss.org Mon Nov 9 21:23:13 2009 Content-Type: multipart/mixed; boundary="===============5020792813711123172==" MIME-Version: 1.0 From: weld-commits at lists.jboss.org To: weld-commits at lists.jboss.org Subject: [weld-commits] Weld SVN: r4927 - doc/trunk/reference/en-US. Date: Mon, 09 Nov 2009 21:23:13 -0500 Message-ID: <200911100223.nAA2NDfJ007700@svn01.web.mwc.hst.phx2.redhat.com> --===============5020792813711123172== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: gavin.king(a)jboss.com Date: 2009-11-09 21:23:12 -0500 (Mon, 09 Nov 2009) New Revision: 4927 Modified: doc/trunk/reference/en-US/decorators.xml doc/trunk/reference/en-US/interceptors.xml Log: revisions Modified: doc/trunk/reference/en-US/decorators.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- doc/trunk/reference/en-US/decorators.xml 2009-11-10 02:01:50 UTC (rev 4= 926) +++ doc/trunk/reference/en-US/decorators.xml 2009-11-10 02:23:12 UTC (rev 4= 927) @@ -17,8 +17,8 @@ interface, and is therefore aware of all the semantics attached to t= hat interface. Since decorators directly implement operations with business semantics, it makes them the perf= ect tool for modeling some kinds of business concerns. It also means that a decorator doesn't have the generality= of an interceptor. Decorators aren't able to - solve technical concerns that cut across many disparate types. The t= wo complement one another. Let's look at some - cases where decorators fit the bill. + solve technical concerns that cut across many disparate types. Inter= ceptors and decorators, though similar in many + ways, are complementary. Let's look at some cases where decorators f= it the bill. = Suppose we have an interface that represents accounts: Modified: doc/trunk/reference/en-US/interceptors.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- doc/trunk/reference/en-US/interceptors.xml 2009-11-10 02:01:50 UTC (rev= 4926) +++ doc/trunk/reference/en-US/interceptors.xml 2009-11-10 02:23:12 UTC (rev= 4927) @@ -5,20 +5,13 @@ Interceptors = - Thanks to the managed bean specification, interceptors are now part = of the core functionality of a bean. That - means that you no longer need to make your class an EJB just to use = interceptors! + Interceptor functionality is defined in the Java Interceptors specif= ication. CDI enhances this functionality with = + a more sophisticated, semantic, annotation-based approach to binding= interceptors to beans. = - But that doesn't mean there aren't other improvements that can be ma= de. CDI builds on the interceptor architecture - of managed beans by introducing a more sophisticated, semantic, anno= tation-based approach to binding interceptors - to beans. + The Interceptors specification defines two kinds of interception poi= nts: - - - Interceptor functionality is defined in the interceptor specificatio= n, which the managed bean, CDI, and EJB - specifications all support. The interceptor specification defines tw= o kinds of interception points: - = @@ -30,12 +23,17 @@ = + In addition, the EJB specification defines timeout method intercepti= on. + + = + A business method interceptor applies to invoca= tions of methods of the bean by clients of the bean: = = @@ -44,19 +42,30 @@ = = An interceptor class may intercept both lifecycle callbacks and busi= ness methods. + = + + A timeout method interceptor applies to invocat= ions of EJB timeout methods by the + container: + = + + =
Interceptor bindings = Suppose we want to declare that some of our beans are transaction= al. The first thing we need is an - interceptor binding annotation to specify ex= actly which beans we're interested in: + interceptor binding type to specify exactly = which beans we're interested in: = = - All bean interceptors are beans, and can take advantage of depend= ency injection and contextual lifecycle - management. + Interceptors can take advantage of dependency injection: = - = @@ -169,7 +179,8 @@ ]]> = - Or we could turn them both off in our test environment by simp= ly taking no action! Ah, so simple. + Or we could turn them both off in our test environment by simp= ly not mentioning them in = + beans.xml! Ah, so simple. =
= @@ -194,7 +205,8 @@ = = --===============5020792813711123172==--