Talking Java EE 7 with Anil Gaur, Vice President of software development at Oracle
Java EE 7 arrives today. We spoke to Oracle VP of Software Development Anil Gaur to discuss the major enterprise release in more detail
caught up with Oracle VP of Software Development Anil Gaur to
discuss the major enterprise release in more detail. You can find
out more about Java EE 7 in the launch webcast later
on today here at 9 am PT / 12 pm ET / 5 pm
Java EE 7 release, in total?
JSRs & 10 updated JSRs were developed by: 16 spec leads, 32
companies and 187 Java experts. In addition, a large number of
engineers contributed towards the reference implementation and TCK
goals? There appears to be a heavy focus on web support for
Java EE 7:
user experience in the browser, we are introducing WebSocket
support as a means to create a low-latency, bi-directional
full-duplex communication channel. We are also introducing an
asynchronous API to improve scalability by executing RESTful
business logic in the background and not holding to a thread.
Similarly a JAX-RS client can be asynchronous allowing it to work
on other tasks, while waiting for a server to respond. RESTful
services often exchange information using JSON. Java EE 7
introduces the JSON Processing API to parse JSON-formatted data
using a Streaming or an Object Model API. JSF now has JSF-friendly
markup, meaning that HTML5-friendly markup, such as type or data-*
attributes, can now be rendered directly in a web browser without a
prior knowledge of the attributes.
developers. This is enabled by reducing the amount of
boilerplate code needed before developers can get to the core
business logic. For example, JMS 2.0 leverages annotations,
dependency injection, AutoCloseable, default resource definitions
and a simplified API to reduce the amount of effort for something
like simply placing a message on a queue to just a few lines of
code. One much-requested feature we’ve added is a standard
RESTful client API so developers can productively make RESTful
calls without using a proprietary client API. Resource definitions
like JMS connection factories and data sources have a default
definition so deploying an application to a Java EE runtime is now
handled in a standard way and requires much less configuration.
We’ve also done a lot of work to improve the integration of JSRs,
to make Java EE 7 even more integrated platform. For example,
Bean Validation can now be used in method declarations to validate
parameter and return values, container-managed transactions are now
available to more than just EJBs and transactional interceptors,
along with the new @Transactional annotation, enable transactions
to be applied to any managed bean method, making it transactional.
CDI is enabled by default, so a beans.xml is no longer required to
simply use a CDI bean.
@TransactionScoped and @FlowScoped. Even existing JSF scope, such
as ViewScoped were rewritten as CDI scope.
enterprise requirements. Java EE is a managed environment, so
applications are not allowed to create their own threads. The
Concurrency Utility API enables developers to create thread pools
that execute tasks concurrently. The Batch API, which was lead by
IBM, is best suited for non-interactive, bulk-oriented and long
running or computationally-intensive tasks. We expect this API to
be pretty popular among enterprise customers.
tell us about Batch Applications for the Java Platform 1.0 (JSR
352) and what this allows users to do? What situations does it
execute a series of jobs that are suitable for non-interactive,
bulk-oriented and long-running tasks. Typical examples are
end-of-month bank statement generation or extract-transform-load in
a data warehouse.
referred as “Job XML”. Each job can have multiple steps; each step
is a “chunk” or “batchlet”. Chunk is item-oriented processing where
a chunk of items are read, processed, and written out, all within a
transaction. There are checkpoint mechanisms available in case
there is an intermittent failure. Batchlet is task-oriented
processing and allows you to roll-your-own batch pattern.
you to seamlessly integrate batch processing with your
How important was this to Java EE 7 and what does it enable you to
communication channel over a single TCP connection. This allows you
to build a low latency application that requires high interactivity
using standard Java EE APIs. This is one of the most significant
technologies added to the Java EE 7 platform and we expect
developers will build innovative applications using this API in
many ways that we cannot yet foresee.
enabling a dynamic user experience, and has been growing rapidly in
popularity with developers over the past few years. This will
drive significantly more demand for services that provide the
information that these dynamic user interfaces need. So, Servlet
3.1 NIO, JAX-RS 2.0 asynchronous RESTful web services, WebSockets,
and even Concurrency Utilities to some degree, deliver the
scalability and communication channels for Java EE developers to
keep those information-hungry clients satisfied.
this give to Java developers?
exchange and the lingua franca of web applications. Typically Java
EE applications will include third-party libraries to process JSON.
Integrating the JSON Processing API in the platform itself allows
us to remove dependency on those additional libraries. As the JSON
APIs are now available in the platform, the application becomes
lighter weight and also uses standard APIs.
(EG) operated in a transparent manner using JCP 2.9. This required
them to publish the EG discussions on a public forum, have a public
issue tracker, respond to a public alias where non-EG members can
post questions and share working drafts of the specification. All
of this allowed the EG to tap into a much wider set of “experts”
and this resulted in a much better quality specification and wider
adoption, even before the specification going final.
addition to the Java EE 7 platform. Java EE is a managed
environment and so creating user threads is not allowed. With this
addition, standard Java SE Concurrency design patterns can now be
used in a managed way within Java EE. For example,
ManagedExecutorService can be used to create a managed
ExecutorService where the user task can be defined as Runnable or
Callable. The threads are managed by the Java EE runtime and JNDI,
class-loading, security and other context information are available
in the spawned threads.
release of the platform. Driving standards in a community with
broad participation from vendors and individuals has its fair share
of challenges. It’s not uncommon to have disagreements within the
Expert Groups on certain topics, which may take a while to reach
consensus, but at the end, that’s a good thing for the platform.
Last summer we had to revisit the theme of Java EE 7 since we
realized that many of the Cloud technologies under consideration
for the specification had not matured enough to be standardized.
Based on the consistent feedback from Java EE vendors and the
community we decided to switch the theme from Cloud to HTML 5 and
Developer Productivity, which has worked out really well.
leave Cloud support out?
Java EE community, partners, and everywhere else for deferring the
Cloud support. There are still no clear standards in the Cloud
space which makes including them within the Java platform only that
more challenging. The components added/updated in the platform have
a much wider appeal to developers and solve their daily problems.
Given the current landscape of PaaS and the ability to provide new
functionality in the platform, we strongly believe that was the
JCache. We’re working towards finalizing the JCache APIs well
before Java EE 8 and we expect there will be incremental progress
in the platform to enable developers to use the new APIs on top of
Java EE 7.
expecting adoption to be very strong for Java EE 7?
and FishCAT efforts, we’ve seen tremendous interest in the new, as
well as the updated, technologies added to the platform. All of the
technologies in Java EE 7 are solving real-world problems and we’ve
seen great adoption of them already.
standard. It provides a cohesive and integrated stack to solve
real-world problems. With 18 Java EE 6 compliant application
servers, the community has a broad selection of
create-once-deploy-anywhere for their applications. GlassFish is
the first Java EE 7 compliant application server, Red Hat has
already announced plans around Java EE 7 compliance and we expect
other vendors to follow as well. I highly encourage the community
to download and try the Java EE 7 SDK fromoracle.com/javaee and
provide us feedback.