This release adds support for Java EE 6, and includes support
for the new specifications such as integrated support for scripting
languages and web services, improved JDBC features, and an integrated
Derby database (in the SDK release), as well as some management features
and performance enhancements.
Java™ EE 6 provides a number
of new or enhanced features, which this release supports:
Web services - Web services offer support for writing XML web service client
applications.
- You can expose your APIs as .NET interoperable web services with
a simple annotation.
- Java SE 6 adds new parsing
and XML to Java object-mapping
APIs, previously only available in Java EE
platform implementations or the Java Web
Services Pack.
Support for Scripting Languages
JDBC Enhancements - The Java SE 6 development
kit includes the all-Java JDBC database, Java DB
based on Apache Derby.
- JDBC includes the updated JDBC 4.0 API, which includes many important
improvements, including special support for XML as an SQL datatype
and better integration of Binary Large OBjects (BLOBs) and Character
Large OBjects (CLOBs)
- In Java 6, you no longer
need to explicitly load the JDBC class. The line: Class.forName("oracle.jdbc.driver.OracleDriver") has
been replaced with a simple declaration: Connection conn
= DriverManager.getConnection("jdbc:derby:TestDB");
Monitoring and Management- Java EE 6 improves the Java Monitoring and Management Console,
or JConsole.
- The graphical look of JConsole has been improved; you can now
monitor several applications in the same JConsole instance, and the
summary screen has been redesigned.
- In Java 6, you can monitor
any application that is running in a Java 6
virtual machine.
- Java 6 comes with sophisticated
thread-management and monitoring features as well.
- The OutOfMemoryError will not just leave you
guessing; it will print out a full stack trace so that you can have
some idea of what might have caused the problem.
Managing the File System- Java 6 gives you much finer
control over your local file system.
- The java.io.File class has the following three
new methods to determine the amount of space available (in bytes)
on a given disk partition:
- The java.io.File class now has a set of functions allowing you
to set the readable, writable, and executable flags on files in your
local file system, as you would with the Unix chmod command.
Security - This release adds the XML-Digital Signature (XML-DSIG) APIs for
creating and manipulating digital signatures. It has also added various
new ways to access platform-native security services, including
- Native Public Key Infrastructure (PKI) and cryptographic services
on Microsoft Windows for secure authentication and communication,
- Java Generic Security Services
(Java GSS) and Kerberos services
for authentication,
- Access to LDAP servers for authenticating users.
Changes in the Java EE
6 APIs
WebBeans 1.0: One of the most groundbreaking API developed
in Java EE 6, WebBeans fills
a number of gaps in Java EE.
WebBeans
- Unifies the JSF, JPA and EJB 3 programming models into a single,
well-integrated platform. WebBeans registers EJB 3 beans, JPA entities,
and JavaBeans as WebBeans
components, which are accessible via EL and are injectable into each
other.
- Brings a robust set of dependency injection features to the platform.
- Enhances the Java EE Interceptor
model by adding the ability to bind interceptors to annotations instead
of having to bind interceptors to target object classes themselves.
JSF 2.0: JSF 2.0 focuses on ease-of-use, on innovation,
and on increasing the feature set. JSF 2.0
- Adds Facelets as a new technology.
- JSF 2.0 brings Java EE 5-
style annotation-driven configuration to the table using annotations
such as @ManagedBeanand @ManagedProperty.
- Provides full AJAX support including partial page processing to
handle AJAX events.
- Provides a built-in capability to handle resources such as images, JavaScript files, and CSS.
EJB 3.1: EJB 3.1 continued to make EJB as simple
as possible while adding meaningful business component services. EJB
3.1
- Made business interfaces optional, even for Session Beans.
- Adds the concept of Singleton Beans. Because they are intended
for managing shared application state, they are completely thread-safe
by default; at the same time, EJB 3.1 adds declarative concurrency
controls for greater flexibility.
- Adds support for cron-style scheduling.
- Adds the capability to invoke Session Bean methods asynchronously
via the @Asynchronous annotation.
- Introduces the concept of EJB 3.1 Lite to add a smaller subset
of the EJB API geared towards the Web Profile. While EJB Lite includes
features like transactions and security, it does not include features
like messaging, remoting and scheduling.
- Introduces a standard JNDI name: java:global/app/module/beah#interface.
JPA 2.0: In Java EE
6, JPA has been officially separated from EJB as a distinct API in
its own right. JPA 2.0
- Adds a number of ORM mapping enhancements, such as the ability
to model collections, maps, and lists using the @ElementCollection
annotation and the ability to map unidirectional one-to-many relationships.
- Enhances both the EntityManager and Query APIs to support things
like retrieving the first result, specifying the maximum size of query
results, getting access to the underlying vendor-specific entity manager
and query objects, and pessimistic locking.
- Enhanced JPQL with SQL-like CASE, NULLIF, COALESCE
- Adds a Criteria API.
Servlet 3.0: Servlet 3.0 embraces the Java EE 5 model. Servlet 3.0
- Introduces annotations such as @WebServlet, @WebFilter and @WebListener.
This reduces web.xml configuration to the point that it can be eliminated
altogether.
- Introduces the idea of web fragments. For more information, see: Creating web fragment projects.
- Adds the ability to programmatically add Servlets, Filters and
Listeners through the ServletContext.
- Follows EJB 3.1 in making deployment descriptors completely optional.
- Provides support for EJB 3.0 and 3.1 beans in web 3.0 projects.
JAX-RS 1.1: JAX-RS 1.1 is the REST counterpart
of JAX-WS. JAX-RS 1.1
- Uses the @Path annotation to determine the URL that a JAX-RS resource
can be accessed.
- Maps input from sources like URL query parameters, parts of the
URL, cookies, and HTTP header values.
- Uses the @Produces annotation to tell JAX-RS what the content
type of returned values are such as text/xml and text/json.
- Integrates with Servlets, WebBeans and EJB