Section 1 - Introduction
- Chapter 1 - Java EE 7 Environment
Section 2 - Cross concerns
- Chapter 2 - Context & Dependency Injection
- Chapter 3 - Bean Validation
Section 3 - Building a domain model
- Chapter 4 - Persistence
- Chapter 5 - Object-Relational Mapping
- Chapter 6 - Managing Persistent Object
Section 4 - Implementing business logic
- Chapter 7 - Enterprise Java Beans
- Chapter 8 - Callback & Timer Service
- Chapter 9 - Transactions
Section 5 - Adding a web & user interface
- Chapter 10 - JavaServer Faces
- Chapter 11 - Processing & Navigation
Section 6 - Interoperability
- Chapter 12 - XML & JSON
- Chapter 13 - Messaging
- Chapter 14 - SOAP Web Services
- Chapter 15 - RESTful Web Service
The code used in the book is defined in the following sub-directories :
- Chapter02 : Introduction to JPA 2.0
- Chapter03 : JPA Mapping
- Chapter04 : JPA Entity Manager and JPQL
- Chapter05 : JPA Lifecycle and Listeners
- Chapter06 : Introduction to EJB 3.1
- Chapter07 : Session beans
- Chapter08 : EJB Lifecycle and Interceptors
- Chapter09 : Transactions and security
- Chapter10 : Introduction to JSF 2.0
- Chapter11 : JSF Pages and components
- Chapter12 : Processing & JSF Navigation
- Chapter19 : JMS Sender
- Chapter19-MDB : JMS Message Driven Bean
- Chapter21-Consumer : SOAP Web service consumer
- Chapter21-Service : SOAP Web service
- Chapter22-Resource : RESTful Web service
To compile, package and execute the code you need the following software :
- Java SE 7 : http://java.sun.com/javase/downloads
- Derby 10.9 : http://db.apache.org/derby
- Maven 3 : http://maven.apache.org
- GlassFish v4 : http://glassfish.org
- Java EE 7.0 - JSR 342 - Project - JIRA - Mailing lists
- Web Profile 7.0 - JSR 342 - Project - Mailing lists
- Managed Beans 1.0 - JSR 342 - Project - Mailing lists
- (Prunned) JAX-RPC 1.1 - JSR 101 - Project
- JAX-WS 2.2a - JSR 224 - Project - Mailing lists
- JAXB 2.2 - JSR 222 - Project - Mailing lists
- Web Services 1.4 - JSR 109
- Web Services Metadata 2.1 - JSR 181
- JAX-RS 2.0 - JSR 339 - Project - Mailing lists - Jersey - @gf_jersey - Code on GitHub
- JSON-P 1.0 - JSR 353 - Project - Mailing lists - JIRA
- (Prunned) JAXR 1.0 - JSR 93
- JSF 2.2 - JSR 344 - Project - Mailing lists
- JSP 2.3 - JSR 245 - Project - Mailing lists
- Debugging Support for Other Languages 1.0 - JSR 45
- JSTL (JavaServer Pages Standard Tag Library) 1.2 - JSR 52
- Servlet 3.1 - JSR 340 - Project - Mailing lists
- WebSocket 1.0 - JSR 356 - Project - Mailing lists
- Expression Language 3.0 - JSR 341 - Project - Mailing lists
- EJB 3.2 - JSR 345 - Project - Mailing lists
- Interceptor 1.2 - JSR 318 - Project - Mailing lists
- JavaMail 1.5 - JSR 919
- JCA 1.7 - JSR 322
- JMS 2.0 - JSR 343 - Project - Mailing lists - [JIRA|http://java.net/jira/browse/JMS_SPEC]
- JPA 2.1 - JSR 338 - Project - Mailing lists
- JTA 1.2 - JSR 907 - Project - Mailing lists - [JIRA|http://java.net/jira/browse/JTA_SPEC]
- DI 1.0 - JSR 330
- CDI 1.1 - JSR 346 - Mailing lists - Documentation - JIRA
- JACC 1.4 - JSR 115
- Bean Validation 1.1 - JSR 349 - Mailing lists - Web site
- (Prunned) Java EE Application Deployment 1.2 - JSR 88
- Java EE Management 1.1 - JSR 77
- JASPIC 1.0 - JSR 196
- Batch 1.0 - JSR 352 - Project - Mailing lists
- Concurrency Utilities for Java EE 1.0 - JSR 236
- Java IDL - IDL To Java Language Mapping Specification - Java Language To IDL Mapping Specification
- JDBC 4.1 - JSR 221
- RMI-IIOP
- JNDI 1.2 - Guide
- JAXP 1.3 - JSR 206
- StAX 1.0 - JSR 173 - Project
- JAAS 1.0 - Guide
- JMX 1.2 - JSR 3
- JAX-WS 2.2a - JSR 224 - Project - Mailing lists
- JAXB 2.2 - JSR 222 - Project - Mailing lists
- JAF 1.1 - JSR 925
- SAAJ 1.3 - Project
- Common Annotations 1.2 - JSR 250
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
--
The test clases of this chapter, by default, use the Embedded mode of Derby (JavaDB). That means that the persistence.xml file defines a persistent unit with the folowing JDBC Driver
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:derby:chapter05DB;create=true"/>
Embedded mode is good for testing, but it means that no database is really created, so you can't browse its structure with a tool. If you can to be able to browse the database structure, you need to change the embedded mode to a client/server implementation that uses the Derby Network Server. For that, you'll have to do the following steps :
-
Install Derby. You must download the distribution and extract the package (http://db.apache.org) into DERBY_HOME directory. Add %DERBY_HOME%\bin to your PATH and run the sysinfo command line to display information about your Java environment and your version of Derby.
-
Start Derby server with the following command : java -jar %DERBY_HOME%\lib\derbyrun.jar server start (or startNetworkServer.bat)
-
Change the JDBC driver and url in your persistence.xml file :
-
Run the test with Maven : mvn clean test
-
Once finished, shutdown the database with : java -jar %DERBY_HOME%\lib\derbyrun.jar server shutdown (or stopNetworkServer.bat)