Abstract Aspect, Aspectj, 50 Chain of Responsibility Pattern, 165–167

Abstract Aspect, Aspectj, 50 Chain of Responsibility Pattern, 165–167

INDEX ■A after throwing advice code, 45 abstract aspect, AspectJ, 50 around advice code, 45 Chain of Responsibility pattern, 165–167 before advice code, 44 Command pattern, 161–164 code of an advice code block, 43 Observer pattern, 157–161 joinpoint types, 38 Proxy pattern, 168–170 advice code, AspectJ 5 acc (.acc) extension defining aspects with annotations, 55 aspect-configuration files, JAC, 75 advice code, JAC access modifiers, AspectJ see wrappers, JAC wildcard for access modifiers, 31 advice code, JBoss AOP ACCESSORS see interceptors, JBoss AOP method-type operators, JAC, 70, 71 advice code, Spring AOP Account EJB see interceptors, Spring AOP implementation of business object pattern, advice tag, jboss-aop.xml file, 102 233–239 adviceexecution joinpoint type, AspectJ, 38, 42 Account interface advised interface, Spring AOP, 132–133 sample application, 213 advises node AccountBean class, 234 number of joinpoints associated with AccountDetails class, 278 pointcut, 28 AccountPOJO class, 244 advisors, Spring AOP acs property, jac, 78 linking pointcut to interceptor, 120 AddDateItf interface, Order class, 48 after advice, AspectJ, 17 ADDERS advice code types, 44 method-type operators, JAC, 71 proceed method, 29 addItem method @After annotation, AspectJ 5, 56 Customer Class, AspectJ, 24 after keyword, AspectJ, 44 Order Class, AspectJ, 25 after returning advice, AspectJ, 45 TraceAspect class, JAC, 62, 67 after returning advice, Spring AOP, 128–129 Administration and Supervision functions, after throwing advice, AspectJ, 45 191–204 AfterReturningAdvice interface, Spring AOP, introduction, 171 128 Java Management Extensions, 191–194 agent layer, JMX, 192, 193 agent layer, 193 aliases, Spring AOP distributed services layer, 193 getAliases method, BeanFactory class, 117 using JMX with AOP, 194–202 all pointcut type, JBoss AOP, 97 advice binding, JBoss AOP anchoring protocol technique weaving pointcuts, 108 aspect injecting Transaction Management advice code, 17–19 code, 268 AOP summary, 21 AnnotatedMixIn aspect class, 107 comparing AOP tools, 142–143 annotation-introduction tag, jboss-aop.xml, 110 definition, 17 AnnotationIntroductionDef annotation, JBoss pointcuts and joinpoints, 28 AOP types of, 17 annotation parameter, 111 advice code execution joinpoint type introducing annotations with annotations, comparing AOP tools, 141 110 advice code, AspectJ, 43–47 annotations after advice code, 44 AspectJ 5, 54–57 after returning advice code, 45 JBoss AOP, 105–108, 110 311 312 ■INDEX annotated aspects, 106 example, 66 annotated interceptors, 107 properties, 66, 78 annotated mix-in, 107 running JAC application, 67 annotated pointcut definitions, 106 applications Ant techniques to manage complexity of compiling JBoss AOP application, 93 applications, 171 running JBoss AOP application, 95 argument lists AOP (aspect-oriented programming) variable length argument lists, 58 advantages for business tier, 227 around advice code, 17 AOP as integration technique, 261–269 advice code types, AspectJ, 45 AOP or design patterns, 246 around advice code with parameters, 46 application administration and supervision, return type, 46 191–202 comparing AOP tools, 142 background/history, 23 eliminating business delegates, 280 benefits of, 5 proceed method, 17 business tier improvements using, 250–254 around advice, Spring AOP comparing language approaches, 137, 146 see interceptors, Spring AOP design patterns of web presentation tier, @Around annotation, AspectJ 5, 56 using in, 298–309 around keyword, AspectJ, 45 designing classes and aspects, 5 around wrappers, JAC, 63 distributed communications, 271–292 ASM, 14 generic AOP, 286 @Aspect annotation, AspectJ 5, 55 implementation of access design patterns, @Aspect annotation, JBoss AOP, 106, 109 280 aspect classes, JAC implementing contracts with, 174–179 cardinality of, 86 OOP and, 3 aspect classes, JBoss AOP origins of, 2 advice code blocks, 111 presentation of client tier, using for, 293–298 interceptors, 102 sample application design, 225 aspect components, JAC, 62 testing applications, 180–191 aspect composition, 19–20 using JMX with AOP, 194–202 consequences of transforming a class into a AOP Alliance API, 64 singleton, 157 JAC wrappers, 63 design, 19 Spring AOP, 113 weaving, 20 aop tag, jboss-aop.xml file Aspect factory classes, JBoss AOP defining JBoss AOP pointcuts, 95 instantiating an aspect, 109 JBoss AOP aspects, 92 aspect instantiation aop.j2ee.business package AspectJ 5, 58 EJBComponents project, 215 comparing AOP tools, 138, 144–145 aop.j2ee.client.java package JAC, 86 sample application, 218 JBoss AOP, 109 APIs aspect ordering dependency inversion, 11 AspectJ, 51–52 application controller pattern comparing AOP tools, 138, 145 J2EE design solutions, 223 JAC, 86–87 using AOP in web presentation tier, 302–304 Spring AOP, 132 ApplicationClient project, Eclipse IDE, 207 aspect oriented applications, 5 DataModel class, 218 aspect reuse Simple class, 218 comparing AOP tools, 145–146 ApplicationContext factory, Spring AOP, 120 aspect tag, jboss-aop.xml ApplicationController aspect, 302 instantiating an aspect, 109 application-descriptor files, JAC aspect weaving, 12–14 comments, 78 AspectJ, 29 compiling JAC application, 66 comparing AOP tools, 137–138 configuring JAC applications, 78 compile-time weaving, 13 creating JAC aspect, 66 ■INDEX 313 definition, 12 Observer pattern, 157–160 JAC, 61 pointcuts, 27, 30–43 AspectComponent class, JAC pointcut parameterization, 41 brief summary, 88 pointcut wildcards, 30–33 AspectComponent class, JAC API, 62 privileged aspect, 52 aspect-configuration files, JAC Proxy pattern, 168–170 compiling JAC application, 66 Singleton pattern, 154–155 configuring aspects, JAC, 75–78 trace aspect, 26 creating JAC aspect, 64–65 weaving, 29 example, 65 AspectJ 5, 53–58 grouping parameters in, 77–78 after advice code, 56 syntax, 65, 76 annotations, 54–57 using, 76 around advice code, 56 AspectJ, 23–53 aspect instantiation, 58 abstract aspect, 49 autoboxing, 58 advice code, 28, 43–47 before advice code, 55 after advice code, 44 declare statements, 57 after returning advice code, 45 aspectOf method, TraceAspect class, 51 after throwing advice code, 45 aspects around advice code, 45 aspect inheritance, 49–50 before advice code, 44 background of concept, 1 aspect inheritance, 49 business precondition aspect, 256–258 aspect instantiation, 50 business tier aspects, 258–261 aspect ordering, 51–52 business tier components, 270 background/history, 1, 23 checking arguments of transaction, 255 Chain of Responsibility pattern, 165–167 comparing AOP tools, 139 Command pattern, 161–164 consequences of transforming a class into a creating first application, 24–30 singleton, 157 advice code, 28 constituent parts of AOP application, 5 compiling, 29 creating manageable resource with, 197–202 pointcut descriptor, 27 extending manageable resource with, 202 trace aspect, 26 data transfer objects, 287 declaring warnings and errors, 52 definition of, 9 filtering operators, joinpoints, 38–40 dependence, 20 introduction mechanism, 47–49 dependency inversion, 11 JAC compared, 61 designing AOP classes and aspects, 5 joinpoint introspection, 33–35 frameworks, 12 joinpoints, defining, 36–40 FrontController aspect, 300 keywords HttpRequestContext aspect, 304 aspect, 27 inheritance, 27 call, 36 integration of crosscutting functionalities, declare error, 52 10 declare, 54 managing communication layer, 284 declare parents, 48 Retry aspect, 285 execution, 36 TransferOptimizer aspect, 291 extends, 49 transforming POJO into entity EJB, 240–242 percflowbelow, 50 transparently introducing persistence into pertarget, 50 account POJO, 242 pointcut, 27 aspects, AspectJ privileged, 52 abstract aspect, 49 proceed, 28, 45 aspect inheritance, 50 thisJoinPoint, 34 aspect instantiation, 51 throws, 46 aspect ordering, 51–52 withincode, 39 Chain of Responsibility design pattern, 165–167 load-time weaving, 53 Command design pattern, 161–164 314 ■INDEX declaring warnings and errors, 52 contracts in Java, 174 load-time weaving, 53 assertions, 172 Observer design pattern, 157–161 attribute tag, jboss-aop.xml privileged aspect, 52 configuring aspect classes with parameters, Proxy pattern, 168–170 110 Singleton pattern, 154–157 authentication aspect, JAC, 81, 83 aspects, JAC AuthenticationAC aspect, JAC, 83 aspects property, 78 authorization filter authentication aspect, 83 using AOP in web presentation tier, 308 brief summary, 88 autoboxing, AspectJ 5, 58 broadcasting aspect, 84 autodetect value, autowire attribute cache aspect, 84 bean data element, Spring AOP, 119 compiling JAC application, 66 automatic integration solutions configuring aspects, 75–78 AOP advantages for business tier, 227 brief summary, 89 auto-proxy feature, Spring AOP, 133–135 confirmation aspect, 83 autowire attribute consistency aspect, 84 bean data element, Spring AOP, 119 creating JAC aspect, 61–66 ■ creating application-descriptor file, 66 B creating aspect-configuration file, 64–65 Bank interface creating pointcut, 62 sample application, 210 creating wrapper, 63–64 BankAdmin class defining behavior of, 63 ApplicationClient project, 218 deployment aspect, 84 BCEL (Byte Code Engineering Library), 14, 70 distributed transactions aspect, 83 bean data element, Spring AOP, 118 execution order of, 86 bean dependencies, Spring AOP, 113 GUI aspect, 82 BeanFactory class, Spring AOP hibernate aspect, 83 methods, 116 HTML/servlet GUI aspect, 81 beans factories, Spring AOP integrity aspect, 84 XmlBeanFactory, 114 JAC aspects library, 81–85 beans, Spring AOP load

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    18 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us