Professional Java® EE Design Patterns by Murat Yener & Alex Theedom
Author:Murat Yener & Alex Theedom
Language: eng
Format: epub
ISBN: 9781118843451
Published: 2014-12-16T00:00:00+00:00
Still, the example given is only valid in EJB and MDBs, which may not be enough for all cases. Thanks to CDI, it is not hard to achieve more.
CDI Interceptors
Before CDI, interceptors were applicable only for EJB and MDBs. CDI unleashed a huge power and transformed interceptors into an AOP-capable feature that works on any object.
Implementing CDI interceptors is straightforward and quite flexible. First, you need to specify a binding. A binding is a custom annotation annotated with @InterceptorBinding.
@InterceptorBinding @Target({TYPE, METHOD}) @Retention(RUNTIME) public @interface Secure {}
The @InterceptorBinding is used to bind interceptors with the target code. Next, you can implement and annotate the interceptor with the custom binding. CDI interceptors are implemented the same way as the EJB interceptors, the only significant difference being the use of the binding annotation which can be seen in Listing 8-10
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12570)
Hello! Python by Anthony Briggs(9915)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9778)
Dependency Injection in .NET by Mark Seemann(9339)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8297)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7073)
Microservices with Go by Alexander Shuiskov(6839)
Practical Design Patterns for Java Developers by Miroslav Wengner(6760)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6700)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Angular Projects - Third Edition by Aristeidis Bampakos(6104)
The Art of Crafting User Stories by The Art of Crafting User Stories(5633)
NetSuite for Consultants - Second Edition by Peter Ries(5567)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5373)
Kotlin in Action by Dmitry Jemerov(5062)
