Create bookmark
EJB 3.1 Cookbook
Build real world EJB solutions with a collection of simple but incredibly effective recipes with this book and eBook
Do you like this document?
Notes
Please login to add notes
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
-
+
Chapter 1: Getting Started With EJBs
- Introduction
- Creating a simple session EJB
- Accessing a session bean using dependency injection
- Accessing the session bean using JNDI
- Creating a simple message-driven bean
- Sending a message to a message-driven bean
- Accessing an EJB from a web service (JAX-WS)
- Accessing an EJB from a web service (JAX-RS)
- Accessing an EJB from an Applet
- Accessing an EJB from JSP
- Calling an EJB from JSF
- Accessing an EJB from a Java Application using JNDI
- Accessing an EJB from a Java Application using an embeddable container
- Accessing the EJB container
-
+
Chapter 2: Session Beans
- Introduction
- Creating a stateless session bean
- Creating a stateful session bean
- Creating a singleton bean
- Using multiple singleton beans
- Using container managed concurrency
- Using bean managed concurrency
- Controlling the initialization process
- Using session beans with more than one business interface
- Understanding parameter behavior and granularity
- Using an asynchronous method to create a background process
-
+
Chapter 3: Message-Driven Beans
- Introduction
- Handling a string-based message
- Handling a byte-based message
- Handling a stream-based message
- Handling a map-based message
- Handling an object-based message
- Using an MDB in a point-to-point application
- Using MDB in a publish-and-subscribe application
- Specifying which types of message to receive using the message selector
- Browsing messages in a message queue
-
+
Chapter 4: EJB Persistence
- Introduction
- Creating an entity
- Creating an entity facade
- Using the EntityManager
- Controlling the Object-Relationship Mapping (ORM) process
- Using embeddable classes in entities
- Using application-managed persistence
- Validating persistent fields and properties
- Validating null fields
- Validating string fields
- Validating temporal fields
- Validation using regular expressions
- Validating Boolean Fields
- Validating Integer Fields
- Using the Validator class
- + Chapter 5: Querying Entities using JPQL and the Criteria API
-
+
Chapter 6: Transaction Processing
- Introduction
- Creating the Demonstration classes
- Handling transactions the easy way
- Using the SessionSynchronization interface with session beans
- Understanding how the
- TransactionAttributeType affects transactions
- Handling transactions manually
- Rolling back a transaction
- Handling errors in a transaction
- Using timeouts with transactions
- + Chapter 7: EJB Security
-
+
Chapter 8: Interceptors
- Introduction
- Creating the Registration Application
- Defining and using interceptors
- Using the InvocationContext to verify parameters
- Using interceptors to enforce security
- Using interceptors to handle transactions
- Using interceptors to handle application statistics
- Using lifecycle methods in interceptors
-
+
Chapter 9: Timer Services
- Introduction
- Setting up the ReportsApplication
- Creating and using declarative timers
- Creating and using programmatic timers
- Understanding calendar-based scheduling
- Using the timer interface
- Using persistent and non-persistent timers
- Creating timers upon application deployment
- Using interceptors with timers
- + Chapter 10: Web Services
-
+
Chapter 11: Packaging the EJB
- Introduction
- Understanding an application's JAR files using the jar command
- Understanding class loading
- Using deployment descriptors for interceptors
- Using deployment descriptors for timer interceptors
- Using deployment descriptor for default interceptors
- Using deployment descriptors for callbacks interceptors
- Using a deployment descriptor for transactions
- Using deployment descriptors for security
- + Chapter 12: EJB Techniques
- Index
Each recipe comprises step-by-step instructions followed by an analysis of what was done in each task and other useful information. The book is designed so that you can read it chapter by chapter, or look at the list of recipes and refer to them in no particular order. It is packed with useful screenshots to make your learning even easier. The book is aimed at Java EE and EJB developers and programmers. Readers should be familiar with the use of servlets in the construction of a web application. A working knowledge of XML is also desirable.
Your free to read time expires in minutes. After that you have to pause for an hour.
Book Details
Authors
Publishers
Publication year : 2011
License: All rights reserved ©
Times read: 1,175

