ManagedExecutorService for Implementing Concurrency Utilities in Java EE 7 – Part 1

java-jee

Prior to Java EE 7 one could make use of the concurrency utilities present in java.util.concurrent package or the java.lang.Thread or java.lang.Runnable. But it was not considered a best practice, not a standard and not safe for the application. This was because the Java EE web and EJB containers instantiate objects using container-managed thread pools […]

Parsing a vCard file to generate a CSV file with the required data

mobile_thumbnail

Off late I have been juggling between a Nokia Symbian phone and an Android phone. The issue which I was facing while I juggled between the phones is the availability of contacts across both the devices. My Android phone had all the contacts which I wanted to be transferred to the Symbian phone as well. […]

A Simple Factory For Collections Using Varargs

java

Suppose you want to create a list object in Java and populate it with some default elements, how would you go about coding it? One will pursue one of the following approaches: (If you have any other approach feel free to share them via the comments and we will update the post accordingly). In the […]

Using Encoder With WebSocket in Java EE 7

java-jee

In my previous post I wrote about using decoders with WebSocket. In the same post I mentioned about Encoders and that they are used for encoding the Java objects or any data into some string/binary format which is then sent to the client end point of the websocket connection. In this post I will elaborate […]

Using Decoder With WebSocket In Java EE 7

java-jee

This post is part of the series of posts covering different JavaEE 7 features. In the past I wrote about: Creating WebSocket using JavaEE 7 Parsing JSON using the JSR 353 implementation in JavaEE 7- Using the Streaming API. Parsing JSON using the JSR 353 implementation in JavaEE 7- Using the Object Model API. This […]

Creating JSON Data Using The Java JSON API (JSR 353)

JSON

JSON has been around for quite sometime now and lot of languages are offering out of the box support for parsing and creating JSON data. The JDK didn’t have support for parsing and creating JSON data out of the box. One had to make use of libraries for parsing and creating JSON data like Google […]

JSON Processing in JavaEE 7- Using Object Model API

java-jee

In my previous post about JSON processing I introduced you to the sample application and then showed how one can make use of the Streaming API to parse the JSON data. The JSON Streaming API was not suited for scenarios explained in my previous post. In such scenarios one can make use of the Object […]

JSON Processing in JavaEE 7- Using Streaming API

java-jee

If you are wondering what JSON is (Read : What is JSON?), you might want to read this article of mine. Java didn’t have a support for JSON processing out of the box. Developers had to include external libraries to enable JSON processing. But with JSR 353 we have support for JSON processing in Java […]

WebSocket Support in Java EE 7

java

I am going to divide this post into following topics for ease of understanding to the readers: What is a WebSocket? JavaEE 7 Support for creating WebSocket end points Javascript support to create WebSocket client end point What is a WebSocket? It is a feature being introduced as part of the HTML5 specification. It introduces […]

Asynchronous Servlet – A new feature in Servlet 3.0 and Java EE 6

java-jee

When Java EE 6 was announced with a new servlet specification i.e Servlet 3.0 – Asynchronous servlet was a very important feature added to the new specification. Suppose your servlet does a long running task like making a JDBC call or invoking a web service, such operations generally take up a lot of CPU time […]