Java Reference
In-Depth Information
Transactional parts of the EJB specification have been extracted and reused in other parts
of the Java EE platform (the transaction support has been placed in the JTA 1.2 specifica-
tion). For instance, the transactional behavior can now be used in CDI beans, thanks to the
introduction of the @Transactional annotation.
Java Persistence API 2.1 - JSR 338
JPA was introduced as a standard part of Java EE in Version 5 of the specification. JPA
was intended to replace entity beans as the default object-relational mapping framework
for Java EE. JPA adopted ideas from third-party object-relational frameworks, such as
Hibernate and JDO, and made them a part of the standard version.
JPA 2.1 is an improvement over JPA 2.0 as it provides several facilities for developers,
which are as follows:
• It provides a standardized schema generation mechanism, thanks to an extended
set of annotations and persistence.xml properties
• It adds support for type conversion, by the introduction of the @Converter an-
notation
• Stored procedures are now supported by the Entity Manager API, so that the use
of the SQL query mechanism for them is no longer required
• Criteria API has been extended by bulk updates and deletes
• Injection is possible into entity listener classes along with the usage of life cycle
callback methods
• Named queries can now be created during runtime
• The JPA Query Language ( JPQL ) has been extended with new database func-
tions
Additionally, Java EE 7-compliant containers must now support preconfigured data
sources (along with other resources), which can be instantly used by JPA entities.
WildFly uses Hibernate as its JPA provider and is shipped with a ready-to-use H2 in-
memory database. The default data source points to the H2 instance hosted inside of the
application server.
Contexts and Dependency Injection for Java EE 1.1 - JSR 346
Version 1.1 of Contexts and Dependency Injection ( CDI ) provides improvements for
the issues identified in CDI after its introduction in Java EE 6. The process of simplifying
Search WWH ::




Custom Search