Tuesday Jul 09, 2013

Servlet 3.1 in Java EE 7

Java EE 7 is live, and it includes many changes in 14 active JSRs. One of them is Servlet 3.1. Java Servlets extend and enhance Web servers. They are a provide a component-based, platform-independent method for building Web-based applications, without the performance limitations of CGI programs. And unlike proprietary server extension mechanisms, servlets are server- and platform-independent. 

Several of the new features in Servlet 3.1 are in the area of security. Spec Lead Shing Wai Chan told OTN "the changes in Servlet 3.1 will make development much easier, especially in the areas of role mapping." He has written some blogs about the new functionality in Servlet 3.1:

Security Constraint by Role
Prior to Servlet 3.1, web containers use proprietary mechanisms to add security-constraints for any authenticated user. See how you can create security constraints for authenticated users. 

deny-uncovered-http-methods
One of the new security features is deny-uncovered-http-methods.

Protocol Upgrade 
Servlet 3.1 now provides support for protocol upgrade.

For more information

Follow Shing Wai Chan's blog

Visit the JSR-340 page, where you can download the Servlet 3.1 spec.

Thursday Jun 27, 2013

An Overview of Batch Processing in Java EE 7

Up on otn/java is a new article by Oracle senior software engineer Mahesh Kannan, titled “An Overview of Batch Processing in Java EE 7.0,” which explains the new batch processing capabilities provided by JSR 352 in Java EE 7. Kannan explains that “Batch processing is used in many industries for tasks ranging from payroll processing; statement generation; end-of-day jobs such as interest calculation and ETL (extract, load, and transform) in a data warehouse; and many more. Typically, batch processing is bulk-oriented, non-interactive, and long running—and might be data- or computation-intensive. Batch jobs can be run on schedule or initiated on demand. Also, since batch jobs are typically long-running jobs, check-pointing and restarting are common features found in batch jobs.”

JSR 352 defines the programming model for batch applications plus a runtime to run and manage batch jobs. The article covers feature highlights, selected APIs, the structure of Job Scheduling Language, and explains some of the key functions of JSR 352 using a simple payroll processing application. The article also describes how developers can run batch applications using GlassFish Server Open Source Edition 4.0.

Kannan summarizes the article as follows:

“In this article, we saw how to write, package, and run simple batch applications that use chunk-style steps. We also saw how the checkpoint feature of the batch runtime allows for the easy restart of failed batch jobs. Yet, we have barely scratched the surface of JSR 352. With the full set of Java EE components and features at your disposal, including servlets, EJB beans, CDI beans, EJB automatic timers, and so on, feature-rich batch applications can be written fairly easily.”

Check out the article here.

Tuesday Mar 13, 2012

Key to the Java EE 6 Platform: NetBeans IDE 7.1

Oracle’s Geertjan Wielenga has a new article up on otn/java, titled “Key to the Java EE 6 Platform: NetBeans IDE 7.1,” in which he shows how the NetBeans IDE provides the tools, templates, and code generators to support Java EE 6 and its main specifications.

He initially observes that, “When you begin to grasp the breadth and ambition of the Java EE 6 Platform, which covers everything from the model (JPA and Bean Validation), to the controller (EJB and Servlets), to the view (JavaServer Faces), a simple entry point is difficult to find. Enter NetBeans IDE 7.1, which is Oracle’s IDE for the Java Platform, created by the same group of developers who created the Java EE 6 Platform. Here you find tools, templates, and code generators intended to be used in combination with the set of specifications that the Java EE 6 Platform encompasses.”

After offering a tour of the NetBeans IDE 7.1 tools that support Java EE 6, Wielenga ends on a cautionary note:

“While code generators and tools such as those described here are great to help you get your feet wet, a danger is that a lot of code is generated that you don't understand and that you therefore do not know how to debug and maintain. The good news is that far less code needs to be generated in Java EE 6 than before, making it far easier to understand and maintain.

Nevertheless, it is advisable to use tools of this kind intelligently. Start small, focusing on specific APIs. Get to know them via the generated code and then slowly extend the application as you become more familiar with the Java EE 6 Platform. Once you are comfortable with the spec, the tools aim to help you become more productive: combining the leanness of the Java EE 6 Platform with the tools in the IDE, you'll be rapidly creating the core of your application.”

Check out the article.


About

Insider News from the Java Team at Oracle!

duke
javeone logo
Links


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
5
6
7
12
13
17
18
19
20
22
24
25
26
27
28
29
30
   
       
Today