Enterprise Java Development@TOPIC@

Part XIX. JPA Server-Side Deployment

2019-08-22 07:11 EST

Table of Contents

Purpose
98. Server-side Resources
98.1. SQL DataSource (defined in Server - standalone.xml)
98.2. Server-side Persistence Units
98.2.1. transaction-type=JTA (default)
98.2.2. transaction-type=RESOURCE_LOCAL
98.3. persistence.xml Placement
98.3.1. EJB persistence.xml Placement
98.3.2. WAR persistence.xml Placement
98.4. Reference External @Entities
98.4.1. Reference External @Entities: EAR Deploy
98.4.2. Reference External @Entities: WAR Deploy
98.5. Summary
99. Persistence Unit/Context Injection
99.1. @PersistenceContext Injection
99.2. @PersistenceUnit Injection
99.3. Context and Dependency Injection (CDI)
99.4. Summary
100. Managed Entities and Remote Interfaces
100.1. Problem: Provider Proxy Classes Marshaled to Client
100.1.1. Potential Solution: Add JPA Provider Classes to Client Classpath
100.1.2. More Scenario Details
100.1.3. Candidate Solution: Cleansed DTOs
100.2. Problem: Lazy Load Exception
100.2.1. Lazy Load Scenario Details
100.2.2. Candidate Solution: Load thru "Touching" Object Tree in Remote Facade
100.2.3. Candidate Solution: Load thru Fetching Object Tree in Query
100.2.4. Candidate Solution: Abstract Remote Interface View with DTO
100.3. Summary
101. Persistence Context Propagation
101.1. Stateless Persistence Context Interaction
101.1.1. Stateless EJB Example Check-in
101.1.2. Stateless EJB Example Client Check-in
101.1.3. EJB Gets Available Rooms from DB
101.1.4. EJB Gets Specific Room
101.1.5. EJB Adds Guest
101.1.6. EJB associates Guest with Room
101.2. Stateful Facade Persistence Context Interaction
101.2.1. Example Stateful Reservation EJB Caches Guest Requests for Client
101.2.2. Example Stateful Reservation EJB Acting on Cached State
101.2.3. Stateful EJB Example Client Check-in
101.2.4. Stateful EJB Persists Guests Prior to Active JTA Transaction
101.2.5. Stateless EJB Populates Propagated Persistence Context with Rooms
101.2.6. Stateful EJB Method Activates Transaction and flush()es Guests in EntityManager Cache
101.2.7. Stateful EJB uses pre-loaded Rooms and Guests without accessing DB (until association)
101.3. Transaction Rollbacks
101.3.1. Stateless Transaction Rollback
101.3.2. Stateful Transaction Rollback
101.4. Pessamistic Locking
101.5. Summary