Servlets 3.x - pluggin servlets at runtime
In the previous post we looked at Servlet 3.0 spec's ability to allow Servlets and filters to be defined in jars outside the deployment descriptor. In this post I am going to look at a different...
View Articletry with resource
I have often used the try-with-resources Statement that was introduced in Java 7. Today I decided to look a little deep into it.In earlier versions of java when dealing with resources that need...
View ArticleJava Streams
We have been exploring Lambda expressions and Functional Interfaces in the past few posts. Now is the time to move to a related new feature called Streams.The definition of Stream from the Oracle...
View Articletry with resource - dealing with failures
In the previous post we saw the try-with-resource statements and how the execution flows. Here I decided to look at the java.sql.Connection class which also implements the AutoCloseable interface.In...
View ArticleServlet 3.x - Building the web.xml less Web Application
Ever since Java introduced annotations, every framework has been looking to provide an XML alternative to their configuration information. So how could servlets be left behind.So I decided to build a...
View ArticleServlet 3.x - HandlesTypes annotation
I came across the @HandlesTypes annotation while looking at Servlet 3.1 specs, and of course with lot of time to spare, I ended up trying it out.As per Oracle documentation:This annotation is used to...
View ArticleServlet 3.x - Using MultipartConfig for file uploads
In an earlier post, I had written on performing file upload and download using Spring MVC. In that example I used commons-fileupload-1.2.2.jar. This is because Servlets did not have built in support...
View ArticleReverse AJAX - what and how ?
I had only heard about the concept of reverse AJAX before. So when I started looking at servlets async behavior I was tempted to check out this concept.AJAX is basically an asynchronous technique of...
View ArticleReverse AJAX - Using the Piggback Technique
In the previous post we saw how reverse AJAX was achieved using the polling technique. Although easy, this is not a very popular or scalable solution. An alternative approach is the...
View ArticleReverse AJAX - The Comet Technique
In my series on Reverse AJAX, I covered Polling and Piggybacking. We saw the pros and cons of either technique. In this post I shall take a look at a third technique - Comet.According to...
View ArticleServlet 3.x - Async Servlets
In our last post, I touched on AsyncServlet and used it to implement a Comet Application. I decided to go into the feature into a bit more depth.We can add listeners to our AsyncContext. Considered the...
View ArticleNeo4j - Retrieve records via Cypher
I had the chance to do a project in big data using Graph databases. Then we had used Neo4j and managed to learn quite some stuff - through hack techniques. Nevertheless our short stint with Graph...
View ArticleNeo4j - Select with parameters
In the previous post we worked on executing a simple select query - one that selected all the Person records in our database. In this post I decided to work on parameterized retrieval. I decided...
View ArticleNeo4j - Traversing along the directions of a Relation
Neo4j Relationships are what connect any two nodes in the graph. To copy paste from the Neo4j guide:Relationships organize nodes into arbitrary structures, allowing a graph to resemble a list, a tree,...
View ArticleNeo4j - Identifying a Nodes Label and a Relations Type
I wanted to find out which all person nodes are associated to a given Movie and in what roles. Consider that my Movie database has several relations -Person acted in a moviePerson directed a movie...
View ArticleNeo4j - Extracting relationship properties
Neo4j relations can also have their own properties. In the sample movie database, the ACTED_IN relationship has a roles property, which can take multiple values (An actor may play multiple roles in a...
View ArticleNeo4j - extracting some schema information using Cypher queries
Since schema is not a compulsion with Neo4j, I was looking at ways to get information on the type of nodes and relationships in the database. These below are not my own queries. I came across a good...
View ArticleServer-Sent Events - How to do it in Sevlets ?
In the past few posts I have seen some techniques to pull of Push Notifications. HTML5 has introduced a couple of new methods - one of them is Server -Sent Events. In this post I am trying to build one...
View ArticleNeo4j - Create a node with Cypher
I decided to use Cypher to create a simple record. Here I tried to create a Movie instancepublic Movie createMovie(String title, int released, String tagline) {try (Transaction tx = graphDb.beginTx())...
View ArticleNeo4j - create multiple nodes and connect with graph
In the last post I worked on creating a single node using cypher. There are other things that can be achieved using cypher when it comes to creation.Consider that I want to add a Movie and its lead...
View Article