In this blog entry I outline the steps necessary to deploy JAX-RS (JSR 311) RESTful web services to the Oracle Cloud. We'll be using Jersey, which is the reference implementation for JAX-RS, and JDeveloper, which is my primary Java IDE.
Servlet 3.1 (JSR 340) is almost ready for the release. One of the new features is the support for non-blocking IO. ReadListener and WriteListener are introduced to allow non-blocking processing in Servlet.
Non-blocking IO can only be used in async (defined in Servlet 3.0) or the upgrade mode. We can set the async in a servlet with @WebServlet annotation.
In this blog, we will illustrate the use...
classes are dead, long live to lambdas
Based on the results of the last-completed Java.net poll, this year's JavaOne in San Francisco, CA is going to be a huge success. Of course, Java.net polls aren't scientific, but it's still surprising when developers overwhelmingly select a single option in a poll. A total of 2146 votes were cast...
Servlet 3.1 Specification (JSR 340) and Java Authorization Contract for Containers (JSR 115) MR3 are almost ready for release. Besides "*", the role-name "**" is introduced in the above two specifications.
In a nutshell, "*" means any role defined in web.xml and "**" means any authenticated user.
Prior to Servlet 3.1, web containers use proprietary mechanisms to add security-constraints for any...
Servlet 3.1 Specification (JSR 340) is almost ready for the release. Several new security features have been added in this version of Servlet specification.
In this blog, I will explain one of the security features, namely deny-uncovered-http-methods.
Let us take a look at a simple security-constraint in web.xml as follows:
<web-app xmlns="http://www.w3.org/2001/XMLSchema" ...
Servlet 3.1 was in Public Review in Janurary 2013. And it is in Proposed Final Draft now. Most of the new features are related to security.
In this following, I will highlight features since Servlet 3.1 Public Review:
add new API javax.servlet.http.Part#getSubmittedFileName
add new API javax.servlet.ServletContext#getVirtualServerNameThis API allows a JASPIC module to be registered in a Servlet...
Tuning Java code presents many challenges and addresses several goals.
One of these goals is to make the application "run faster".
Recently, our end-users were getting multiple-second response times from our web application's home page.
This was unacceptable.
We were asked to see what we can do to make the web application "run faster".
We began by looking at the usual suspects... database access...
One of the first things we did as we began to learn about Java was to create our own library of Java books.
Every member of the development team was given the chance (and funding) to build their own collection of books.
In time, these book collections became a sort of "comfort blanket" for the developers.
In addition to being a valuable source of reference material,
these collections act as a...
One of the biggest challenges facing us during the creation of our first Java application
was learning to develop with the Java programming language.
We were concerned about how well our team of developers would learn and adapt to Java.
Since Java was an object-oriented programming language, we had object-oriented concepts to learn as well.
Our first Java training class was titled, "Developing...
Assembling a team of Java developers can be a challenging task.
Getting the right people together requires a combination of luck, skill, and plenty of patience.
When someone new joins your team, they could also be new to your company.
Over the years, we have conducted many job interviews of Java developer candidates wishing to join our team and company.
Our Java job interview format is simple and...
The simple build tool (SBT) is a tool for building Java and Scala projects. SBT aims to build well and allow users to customize endlessly, but above all, SBT strives to provide consistency of basic concepts so that, once learned, you don’t have to unlearn them as you dive deeper into the build system. This article, based on chapter 1 of SBT in Action, shows you how to set up SBT and define an SBT build.
The Java Platform, Enterprise Edition (Java EE) standard solves the problem of leaky concerns with metadata as annotations in your code or as external XML descriptors. This approach allows the runtime container to implement predefined cross-cutting concerns—security, concurrency, persistence, transactions, and remoteness—in a generic way by intercepting calls to your application components. In this article, based on chapter 3 of Java Persistence with Hibernate, Second Edition, the authors discuss domain model metadata.
The applications have grown together with the man dream to get more and more information, then more application have been emerging and the man had became hostage of the application.
For example we can recognized the evolution between man and machine:
In the first time: Many men to just one machine ( like mainframe's age) then one man to one machine ( in to Personal computer era) and...
Acteur - a framework for building scalable, asynchronous web applications using Netty + Guice with an interesting programming model
Creating a JavaFX 2 (or should I say FX8) application can be a time consuming task. We all got used to powerful frameworks helping us creating such applications based on Swing (NetBeans Platform) or SWT (Eclipse). There even was an attempt at getting this standardized in Java for Swing - JAF anyone? So where is such an application framework based on JavaFX 2/8, which leverages all the nice things from Java7 and 8?
Kanban is an approach to software development based on the principles of lean. It has quickly been picked up by many businesses around the world. You can pick it up too! This article, based on chapter 2 of Kanban in Action, defines kanban, introduces kanban principles, and gets you started using kanban.
One of my favorite sessions at Jfokus 2013 was presented by Typesafe co-founder and Java Champion Jonas Bonér. I always enjoy discussions about how technology evolves over the decades, how we break away from concepts, then sometimes weave our way back via the latest and greatest thing, which can sometimes appear strikingly similar to something that was very much in vogue a decade or so earlier. So...
Gradle provides a build-by-convention approach for certain problem domains like Java projects by introducing pre-defined project layouts with sensible defaults. In this article, based on chapter 3 of Gradle in Action, author Benjamin Muschko explains how to apply the Java, War and Jetty plugins to build and run your web application with Gradle.