Enterprise JavaBeans 3 1 Developing Enterprise Java Components 6th Edition by Andrew Lee Rubinger, Bill Burke – Ebook PDF Instant Download/Delivery. 0596158025, 9780596158026
Full download Enterprise JavaBeans 3 1 Developing Enterprise Java Components 6th Edition after payment
Product details:
ISBN 10: 0596158025
ISBN 13: 9780596158026
Author: Andrew Lee Rubinger, Bill Burke
Learn how to code, package, deploy, and test functional Enterprise JavaBeans with the latest edition of this bestselling guide. Written by the developers of JBoss EJB 3.1, this book not only brings you up to speed on each component type and container service in this implementation, it also provides a workbook with several hands-on examples to help you gain immediate experience with these components. With version 3.1, EJB’s server-side component model for building distributed business applications is simpler than ever. But it’s still a complex technology that requires study and lots of practice to master. Enterprise JavaBeans 3.1 is the most complete reference on this specification. You’ll find a straightforward, no-nonsense explanation of the underlying technology, including Java classes and interfaces, the component model, and the runtime behavior of EJB. Develop your first EJBs with a hands-on walkthrough of EJB 3.1 concepts Learn how to encapsulate business logic with Session Beans and Message-Driven Beans Discover how to handle persistence through Entity Beans, the EntityManager, and the Java Persistence API Understand EJB’s container services such as dependency injection, concurrency, and interceptors Integrate EJB with other technologies in the Java Enterprise Edition platform Use examples with either the JBossAS, OpenEJB, or GlassFish v3 EJB Containers.
Enterprise JavaBeans 3 1 Developing Enterprise Java Components 6th Table of contents:
Part I, Why Enterprise JavaBeans?
Part II, Server-Side Component Models
Part III, EJB and Persistence
Part IV, Container Services
Part V, Examples
Software and Versions
Conventions Used in This Book
Using Code Examples
Safari® Books Online
Comments and Questions
Acknowledgments
Part I. Why Enterprise JavaBeans?
Chapter 1. Introduction
The Problem Domain
Breaking Up Responsibilities
Core concerns
Cross-cutting concerns
Plumbing
Code Smart, Not Hard
Do less
The Container
The Enterprise JavaBeans™ 3.1 Specification
EJB defined
Review
Chapter 2. Component Types
Server-Side Component Types
Session Beans
Stateless session beans (SLSBs)
Stateful session beans (SFSBs)
Singleton beans
Message-Driven Beans (MDBs)
Entity Beans
The Java Persistence Model
The Model Isn’t Everything
Chapter 3. Container Services
Dependency Injection (DI)
Concurrency
Instance Pooling/Caching
Transactions
Security
Timers
Naming and Object Stores
Interoperability
Lifecycle Callbacks
Interceptors
Platform Integration
Bringing It Together
Chapter 4. Developing Your First EJBs
Step 1: Preparation
Definitions
Bean implementation class (session and message-driven beans)
Bean instance (session and message-driven beans)
Client view (session and message-driven beans)
EJB Proxy (session beans)
Local versus remote (session beans)
Business interface (session beans)
Component interface (session beans)
Home interface (session beans)
Endpoint interface (session beans)
Message interface (MDBs)
Naming Conventions
Common business name
Conventions for the Examples
Step 2: Coding the EJB
The Contract
The Bean Implementation Class
Out-of-Container Testing
Integration Testing
Packaging
Deployment into the Container
The client
Summary
Part II. Server-Side Component Models
Chapter 5. The Stateless Session Bean
The XML Deployment Descriptor
SessionContext
EJBContext
The Lifecycle of a Stateless Session Bean
The Does Not Exist State
The Method-Ready Pool
Transitioning to the Method-Ready Pool
Life in the Method-Ready Pool
Transitioning out of the Method-Ready Pool: The death of a stateless bean instance
Example: The EncryptionEJB
The Contract: Business Interfaces
Application Exceptions
Bean Implementation Class
Accessing Environment Properties (Injection and Lookup)
Asynchronous Methods
Chapter 6. The Stateful Session Bean
The Lifecycle of a Stateful Session Bean
The Does Not Exist State
The Method-Ready State
Transitioning into the Method-Ready state
Life in the Method-Ready state
Transitioning out of the Method-Ready state
The Passivated State
System exceptions
Example: The FileTransferEJB
The Contract: Business Interfaces
Exceptions
Bean Implementation Class
POJO Testing Outside the Container
Integration Testing
Chapter 7. The Singleton Session Bean
Concurrency
Shared Mutable Access
Container-Managed Concurrency
Bean-Managed Concurrency
Lifecycle
Explicit Startup
Example: The RSSCacheEJB
Value Objects
The Contract: Business Interfaces
Bean Implementation Class
Chapter 8. Message-Driven Beans
JMS and Message-Driven Beans
JMS as a Resource
JMS Is Asynchronous
JMS Messaging Models
Publish-and-subscribe
Point-to-point
Which messaging model should you use?
Learning More About JMS
JMS-Based Message-Driven Beans
@MessageDriven
@ActivationConfigProperty
Message selector
Acknowledge mode
Subscription durability
MessageDrivenContext
MessageListener interface
Taskflow and integration for B2B: onMessage()
Sending messages from a message-driven bean
The Lifecycle of a Message-Driven Bean
The Does Not Exist State
The Method-Ready Pool
Transitioning to the Method-Ready Pool
Life in the Method-Ready Pool
Transitioning out of the Method-Ready Pool: The death of an MDB instance
Connector-Based Message-Driven Beans
Message Linking
Session Beans Should Not Receive Messages
The JMS APIs
TopicConnectionFactory and Topic
Connection and Session
MessageProducer
Message types
Example: The StatusUpdateEJBs
JMS application client: Message producer
Create a base listener
Further testing
Part III. EJB and Persistence
Chapter 9. Persistence: EntityManager
Entities Are POJOs
Managed Versus Unmanaged Entities
Persistence Context
Transaction-scoped persistence context
Extended persistence context
Detached entities
Packaging a Persistence Unit
The Persistence Unit Class Set
Obtaining an EntityManager
EntityManagerFactory
Getting an EntityManagerFactory in Java EE
Obtaining a Persistence Context
Interacting with an EntityManager
Example: A Persistent Employee Registry
A Transactional Abstraction
Persisting Entities
Finding and Updating Entities
find() and getReference()
merge()
Queries
Removing Entities
refresh()
contains() and clear()
flush() and FlushModeType
Locking
unwrap() and getDelegate()
Chapter 10. Mapping Persistent Objects
The Programming Model
The Employee Entity
The Bean Class
XML Mapping File
Basic Relational Mapping
Elementary Schema Mappings
@Table
@Column
Primary Keys
@Id
Table Generators
Sequence Generators
Primary-Key Classes and Composite Keys
@IdClass
@EmbeddedId
Property Mappings
@Transient
@Basic and FetchType
@Lob
@Temporal
@Enumerated
@Embedded Objects
Chapter 11. Entity Relationships
The Seven Relationship Types
One-to-One Unidirectional Relationship
Relational database schema
Programming model
Primary-key join columns
Default relationship mapping
One-to-One Bidirectional Relationship
Relational database schema
One-to-Many Unidirectional Relationship
Relational database schema
Programming model
Many-to-One Unidirectional Relationship
Relational database schema
Programming model
One-to-Many Bidirectional Relationship
Relational database schema
Programming model
Usage
Many-to-Many Bidirectional Relationship
Relational database schema
Programming model
Many-to-Many Unidirectional Relationship
Relational database schema
Programming model
Mapping Collection-Based Relationships
Ordered List-Based Relationship
Map-Based Relationship
Detached Entities and FetchType
Cascading
PERSIST
MERGE
REMOVE
REFRESH
ALL
When to Use Cascading
Chapter 12. Entity Inheritance
Single Table per Class Hierarchy
Advantages
Disadvantages
Table per Concrete Class
Advantages
Disadvantages
Table per Subclass
Advantages
Disadvantages
Mixing Strategies
Nonentity Base Classes
Chapter 13. Queries, the Criteria API, and JPA QL
Query API
Parameters
Date Parameters
Paging Results
Hints
FlushMode
JPA QL
Abstract Schema Names
Simple Queries
Selecting Entity and Relationship Properties
Constructor Expressions
The IN Operator and INNER JOIN
LEFT JOIN
Fetch Joins
Using DISTINCT
The WHERE Clause and Literals
The WHERE Clause and Operator Precedence
The WHERE Clause and Arithmetic Operators
The WHERE Clause and Logical Operators
The WHERE Clause and Comparison Symbols
The WHERE Clause and Equality Semantics
The WHERE Clause and BETWEEN
The WHERE Clause and IN
The WHERE Clause and IS NULL
The WHERE Clause and IS EMPTY
The WHERE Clause and MEMBER OF
The WHERE Clause and LIKE
Functional Expressions
Functional expressions in the WHERE clause
Functions returning dates and times
Aggregate functions in the SELECT clause
COUNT (identifier or path expression)
MAX( path expression), MIN( path expression)
AVG( numeric ), SUM( numeric)
DISTINCT, nulls, and empty arguments
The ORDER BY Clause
Bulk UPDATE and DELETE
Native Queries
Scalar Native Queries
Simple Entity Native Queries
Complex Native Queries
Native queries with multiple entities
Named Queries
Named Native Queries
Chapter 14. Entity Callbacks and Listeners
Callback Events
Callbacks on Entity Classes
Entity Listeners
Default Entity Listeners
Inheritance and Listeners
Part IV. Container Services
Chapter 15. Security
Authentication and Identity
Authorization
Example: A Secured School
The Business Interface
Assigning Method Permissions
Programmatic Security
The RunAs Security Identity
Chapter 16. JNDI, the ENC, and Injection
Global JNDI
The JNDI ENC
What Can Be Registered in the JNDI ENC?
How Is the JNDI ENC Populated?
XML population
Annotation population
How Are Things Referenced from the ENC?
Using EJBContext
Annotation injection
Default ENC name
XML injection
XML overrides
Injection and inheritance
Reference and Injection Types
EJB References
@javax.ejb.EJB
Ambiguous and overloaded EJB names
Resolving EJB references
EntityManagerFactory References
@javax.persistence.PersistenceUnit
XML-based EntityManagerFactory references
Scoped and overloaded unit names
EntityManager References
@javax.persistence.PersistenceContext
Resource References
@javax.annotation.Resource
Shareable resources
Resource Environment and Administered Objects
Environment Entries
Message Destination References
XML-based resource references
Using @Resource
Chapter 17. Transactions
ACID Transactions
Example: The BlackjackEJB
Helper EJBs for Testing Transactions
Is the BlackjackEJB Atomic?
Is the BlackjackEJB Consistent?
Is the BlackjackEJB Isolated?
Is the BlackjackEJB Durable?
Declarative Transaction Management
Transaction Scope
Transaction Attributes
Using the @TransactionAttribute annotation
Transaction attributes defined
EJB 3.0 persistence and transaction attributes
Message-driven beans and transaction attributes
EJB endpoints and transaction attributes
Transaction Propagation
Transactions and persistence context propagation
Isolation and Database Locking
Dirty, Repeatable, and Phantom Reads
Dirty reads
Repeatable reads
Phantom reads
Database Locks
Transaction Isolation Levels
Balancing Performance Against Consistency
Controlling isolation levels
Optimistic Locking
Programmatic Locking
Nontransactional EJBs
Explicit Transaction Management
Transaction Propagation in Bean-Managed Transactions
Message-driven beans and bean-managed transactions
Heuristic Decisions
UserTransaction
Status
EJBContext Rollback Methods
Exceptions and Transactions
Application Exceptions Versus System Exceptions
System exceptions
Application exceptions
Transactional Stateful Session Beans
The Transactional Method-Ready State
Transitioning into the Transactional Method-Ready state
Life in the Transactional Method-Ready state
Conversational Persistence Contexts
Chapter 18. Interceptors
Intercepting Methods
Interceptor Class
Applying Interceptors
Annotated methods and classes
Applying interceptors through XML
Default interceptors
Disabling interceptors
Interceptors and Injection
Intercepting Lifecycle Events
Custom Injection Annotations
Exception Handling
Aborting a Method Invocation
Catch and Rethrow Exceptions
Interceptor Lifecycle
Bean Class @AroundInvoke Methods
Chapter 19. Timer Service
Example: A Batch Credit Card Processing System
The Business Interface
javax.ejb.ScheduleExpression and @javax.ejb.Schedule
The Bean Implementation Class
The TimerService
The Timer
Canceling timers
Identifying timers
Retrieving other information from timers
The TimerHandle object
Exceptions
Transactions
Stateless Session Bean Timers
Message-Driven Bean Timers
Chapter 20. EJB 3.1: Web Services Standards
Web Services Overview
XML Schema and XML Namespaces
XML Schema
XML Namespaces
SOAP 1.1
Web Services Styles
Exchanging SOAP Messages with HTTP
Now You See It, Now You Don’t
WSDL 1.1
The Element
The and Elements
The Element
The and Elements
UDDI 2.0
From Standards to Implementation
Chapter 21. EJB 3.1 and Web Services
Accessing Web Services with JAX-RPC
Generating JAX-RPC Artifacts from WSDL
Calling a Service from an EJB
The Deployment Element
The JAX-RPC Mapping File
Defining a Web Service with JAX-RPC
The WSDL Document
The Service Endpoint Interface
The Stateless Bean Class
The Deployment Files
The WSDL file
The JAX-RPC mapping file
The webservices.xml file
Using JAX-WS
The @WebService Annotation
The @WebMethod Annotation
The @SOAPBinding Annotation
The @WebParam Annotation
The @WebResult Annotation
The @OneWay Annotation
Separating the Web Services Contract
The Service Class
The Service Endpoint Interface
The @WebServiceRef Annotation
Other Annotations and APIs
JAXB
Taking JAXB Further
Conclusion
Part V. Examples
Appendix A. FirstEJB Example
Description
Online Companion Information
Source Listing
Implementation Resources
CalculatorBeanBase.java
CalculatorCommonBusiness.java
CalculatorLocal.java
CalculatorLocalBusiness.java
CalculatorLocalHome.java
CalculatorRemote.java
CalculatorRemoteBusiness.java
CalculatorRemoteHome.java
ManyViewCalculatorBean.java
NoInterfaceViewCalculatorBean.java
SimpleCalculatorBean.java
Test Resources
CalculatorAssertionDelegate.java
CalculatorIntegrationTestCase.java
CalculatorUnitTestCase.java
MultiViewCalculatorIntegrationTestCase.java
jndi.properties
Appendix B. Stateless Session EJB: Encryption Example
Description
Online Companion Information
Source Listing
Implementation Resources
EncryptionBean.java
EncryptionCommonBusiness.java
EncryptionException.java
EncryptionLocalBusiness.java
EncryptionRemoteBusiness.java
META-INF/ejb-jar.xml
Test Resources
EncryptionIntegrationTestCase.java
EncryptionTestCaseSupport.java
EncryptionUnitTestCase.java
Appendix C. Stateful Session EJB: FTP Client Example
Description
Online Companion Information
Source Listing
Implementation Resources
FileTransferBean.java
EncryptionBean.java
EncryptionCommonBusiness.java
EncryptionException.java
EncryptionLocalBusiness.java
EncryptionRemoteBusiness.java
META-INF/ejb-jar.xml
Test Resources
EncryptionIntegrationTestCase.java
EncryptionTestCaseSupport.java
EncryptionUnitTestCase.java
FileTransferCommonBusiness.java
FileTransferException.java
FileTransferRemoteBusiness.java
Test Resources
FileTransferIntegrationTestCase.java
FileTransferTestCaseBase.java
FileTransferUnitTestCase.java
FtpServerPojo.java
ftpusers.properties
Appendix D. Singleton Session EJB: RSS Cache Example
Description
Online Companion Information
Source Listing
Implementation Resources
ProtectExportUtil.java
RomeRssEntry.java
RssCacheBean.java
RssCacheCommonBusiness.java
RssEntry.java
Test Resources
RssCacheTestCaseBase.java
RssCacheUnitTestCase.java
TestRssCacheBean.java
jndi.properties
Appendix E. Message-Driven EJB: Status Update Listeners Example
Description
Online Companion Information
Source Listing
Implementation Resources
StatusUpdate.java
StatusUpdateConstants.java
EnvironmentSpecificTwitterUtil.java
LoggingStatusUpdateMdb.java
SecurityActions.java
StatusUpdateBeanBase.java
TwitterUpdateMdb.java
hornetq-jms.xml
Test Resources
MockObjectMessage.java
StatusUpdateIntegrationTest.java
StatusUpdateTestBase.java
StatusUpdateUnitTestCase.java
TwitterUpdateBlockingTestMdb.java
Appendix F. Java Persistence APIs: Employee Registry Example
Description
Online Companion Information
Source Listing
Implementation Resources
SimpleEmployee.java
EmbeddedEmployeePK.java
EmployeeType.java
EmployeeWithEmbeddedPK.java
EmployeeWithExternalCompositePK.java
EmployeeWithMappedSuperClassId.java
EmployeeWithProperties.java
ExternalEmployeePK.java
Address.java
Computer.java
Customer.java
Employee.java
Phone.java
PhoneType.java
Task.java
Team.java
Customer.java
Employee.java
Person.java
Customer.java
Employee.java
Person.java
Customer.java
Employee.java
Person.java
EntityListenerEmployee.java
EventTracker.java
persistence.xml
Test Resources
EmployeeIntegrationTest.java
Appendix G. Security: Secured School Example
Description
Online Companion Information
Source Listing
Implementation Resources
FireDepartmentLocalBusiness.java
SchoolClosedException.java
SecureSchoolLocalBusiness.java
FileDepartmentBean.java
Roles.java
SecureSchoolBean.java
Test Resources
SecureSchoolIntegrationTest.java
groups.properties
users.properties
Appendix H. Transactions: Blackjack Game Example
Description
Online Companion Information
Source Listing
Implementation Resources
BankLocalBusiness.java
BlackjackGameLocalBusiness.java
InsufficientBalanceException.java
Account.java
User.java
BankBean.java
BlackjackGameBean.java
BlackjackServiceConstants.java
persistence.xml
Test Resources
TransactionalBlackjackGameIntegrationTest.java
DbInitializerBean.java
ExampleUserData.java
Appendix I. Interceptors: TV Channel Service Example
Description
Online Companion Information
Source Listing
Implementation Resources
AuditedInvocation.java
CachingAuditor.java
Channel2AccessPolicy.java
Channel2ClosedException.java
Channel2Restrictor.java
TunerBean.java
TunerLocalBusiness.java
Test Resources
CachingInterceptorUnitTestCase.java
Channel2RestrictorUnitTestCase.java
InterceptorIntegrationTest.java
MockInvocationContext.java
SecurityActions.java
Appendix J. Timer Service: Credit Card Processor Example
Description
Online Companion Information
Source Listing
Implementation Resources
CreditCardTransaction.java
CreditCardTransactionProcessingLocalBusiness.java
CreditCardTransactionProcessingBean.java
People also search for Enterprise JavaBeans 3 1 Developing Enterprise Java Components 6th:
enterprise javabeans
an enterprise javabeans can be deployed in
mastering enterprise javabeans 3.0 pdf
mastering enterprise javabeans
ejbca enterprise javabeans certificate authority