EJB 3 in Action
Manning Publications (Verlag)
978-1-935182-99-3 (ISBN)
- Titel ist leider vergriffen;
keine Neuauflage - Artikel merken
- Uses real-world examples
- In depth coverage of EJB 3.1
- For both novice and experienced EJB Developers
Building on the bestselling first edition, EJB 3 in Action, Second Edition tackles EJB 3.2 head-on, through numerous code samples, real-life scenarios, and illustrations.
This book is a fast-paced tutorial for Java EE business component development using EJB 3.2, JPA 2 and CDI. Besides covering the basics of EJB 3.2, this book includes in-depth EJB 3.2 internal implementation details, best practices, design patterns, and performance tuning tips.
The EJB 3 framework was a major advancement for Java EE developers, providing a consistent, easy-to-use model to create and extend applications. Building on the bestselling first edition, EJB 3 in Action, Second Edition tackles EJB 3.1 head-on, through numerous code samples, real-life scenarios, and illustrations.
This book is a fast-paced tutorial and includes in-depth EJB 3.1 internal implementation details, best practices, design patterns, and performance tuning tips. The book also discusses using open source frameworks like Seam and Spring with EJB 3.1.
This book is written for Java EE 6/EJB 3.1 beginners as well as experienced EJB developers.
Debu Panda is a seasoned Java architect, developer, and community leader. He has authored more than 35 articles on enterprise Java and SOA technologies and two books on enterprise middleware.
Reza Rahman is a Senior Software Engineer and Technology Outreach Advocate. A frequent speaker, Reza is a member of the Java EE 6 and EJB 3.1 expert groups.
Ryan Cuprak is a technology analyst and president of the Connecticut Java Users Group. He is a Sun Certified NetBeans IDE Specialist.
Michael Remijan is a Java Technology Team Lead, Developer, and college Instructor. He has numerous Sun Certifications, and actively writes articles on a variety of Java related technologies.
preface
acknowledgments
about this book
about the authors
about the cover illustration
Part 1 Overview of the EJB landscape
What’s what in EJB 3
EJB overview
Understanding EJB types
Related specifications
EJB runtimes
Brave new innovations
Changes in EJB 3.2
Summary
A first taste of EJB
Introducing the ActionBazaar application
Building business logic with EJB 3
Using CDI with EJB 3
Using JPA 2 with EJB 3
Summary
Part 2 Working with EJB components
Building business logic with session beans
Getting to know session beans
Stateless session beans
Stateful session beans
Singleton session beans
Asynchronous session beans
Summary
Messaging and developing MDBs
Messaging concepts
Introducing JMS
Working with MDBs
MDB best practices
Summary
EJB runtime context, dependency injection, and crosscutting logic
EJB context
Using EJB DI and JNDI
AOP in the EJB world: interceptors
Summary
Transactions and security
Understanding transactions
Container-managed transactions
Bean-managed transactions
EJB security
Summary
Scheduling and timers
Scheduling basics
Declarative timers
Using programmatic timers
Summary
Exposing EJBs as web services
What is a web service?
Exposing EJBs using SOAP (JAX-WS)
Exposing EJBs using REST (JAX-RS)
Choosing between SOAP and REST
Summary
Part 3 Using EJB with JPA and CDI
JPA entities
Introducing JPA
Domain modeling
Implementing domain objects with JPA
Entity relationships
Mapping inheritance
Summary
Managing entities
Introducing EntityManager
Persistence operations
Entity queries
Summary
JPQL
Introducing JPQL
Criteria queries
Native queries
Summary
Using CDI with EJB 3
Introducing CDI
CDI beans
Next generation of dependency injection
Interceptor and decorators
Component stereotypes
Injecting events
Using conversations
Using CDI effectively with EJB 3
Summary
Part 4 Putting EJB into action
Packaging EJB 3 applications
Packaging your applications
Exploring class loading
Packaging session and message-driven beans
JPA packaging
CDI packaging
Best practices and common deployment issues
Summary
Using WebSockets with EJB 3
Limits of request–response
Introducing WebSockets
WebSockets and Java EE
WebSockets in ActionBazaar
Using WebSockets effectively
Summary
Testing and EJB
Introducing testing
Unit testing EJBs
Integration testing using embedded EJBContainer
Integration testing using Arquillian
Testing effectively
Summary
appendix A Deployment descriptor reference
appendix B Getting started with Java EE 7 SDK
appendix C EJB 3 developer certification exam
index
In its early days, EJB was inspired by the distributed computing ideas of technologies such as CORBA and was intended to add scalability to server-side applications. EJB and J2EE enjoyed some of the greatest buzz in the industry during the dot.com boom. The initial goal for EJB was to provide a simpler alternative to CORBA through the benefits of a standard development framework and reusable components. By the time EJB 2 was released, it became apparent that the EJB framework could become the new standard for server-side development. The framework provided Enterprise developers with everything they needed—remoting, transaction management, security, state maintenance, persistence, and web services—but it was heavyweight, requiring developers to focus more on the framework itself than on the requirements of their business applications. Because EJB was loaded with more features, its inventors failed to address its growing complexity. As the community became disenchanted with the limitations of EJB 2, innovative open source tools emerged. These tools were signs of the increasing discontent with the complexities of Java EE. Though well-intentioned, these tools made Enterprise development even more complex since they deviated from the standards of the application server they were to run in. It was time for the Java Community Process (JCP) and expert groups to work on the simplification of Java EE development. That was the sole motivation behind Java EE 5 and the goal of the EJB 3 expert group. For a technology with a wide deployment base, the changes that came with EJB 3 were nothing short of stunning. EJB 3 successfully melds innovative techniques to make component development as easy as possible. These techniques include the use of annotations, metadata programming, dependency injection, AspectJ-like interceptors, and intelligent defaulting. The heavyweight inheritance-based programming model was abandoned in favor of Plain Old Java Object (POJO) programming, and the verbose XML descriptor was now out of the developer’s way. The changes to the persistence model were particularly dramatic. EJB 3 left behind the flawed EJB 2 Entity Beans model in favor of the lightweight Java Persistence API (JPA). Unlike Entity Beans, JPA is not container-based. It has more in common with open source object relational mapping (ORM) tools that emerged in the community in response to Entity Beans complexity. JPA can be used either inside or outside a Java Enterprise server and is now the de facto persistence standard for Java. Its Java Persistence Query Language (JPQL) standardizes object relational queries but also supports native SQL queries if the need arises. The changes made in EJB 3 have been well received in the Java community. Its simplified specification has led to its wide adoption in new projects. More and more companies are giving the once “ugly” EJB technology another look and they like what they see. With the release of EJB 3.2, the adoption will continue to grow. EJB 3.2 has made support for EJB 2 optional so that older technology can finally be sunset and innovations in EJB 3 can continue to grow. EJB 3.2 has also seen major enhancements to message-driven beans (MDBs), making messaging much easier. EJB 3.2 made improvements to stateful session bean passivation and session bean local interfaces, as well as dramatic improvements to the timer services. All this and more await you in EJB 3.2. Since EJB is POJO-based, every Java developer can easily become an EJB developer. Simple annotations give your business logic safe transaction management, security, and exposure as web services for easy interoperability in your company. We strive to keep our book different from other books on EJB by providing practical examples, best practices, and tips for performance tuning. We highlight what’s new in the EJB 3.2 specification, which gives you more tools for your development. We hope this revised edition will help you to quickly learn how to use EJB 3 effectively in your next Enterprise application.
Erscheint lt. Verlag | 10.4.2014 |
---|---|
Zusatzinfo | illustrations |
Verlagsort | New York |
Sprache | englisch |
Maße | 189 x 231 mm |
Gewicht | 936 g |
Einbandart | kartoniert |
Themenwelt | Informatik ► Programmiersprachen / -werkzeuge ► Java |
Mathematik / Informatik ► Informatik ► Software Entwicklung | |
ISBN-10 | 1-935182-99-4 / 1935182994 |
ISBN-13 | 978-1-935182-99-3 / 9781935182993 |
Zustand | Neuware |
Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
Haben Sie eine Frage zum Produkt? |
aus dem Bereich