Secure RESTful Services with Maven, Spring, Apache CXF and Spring Security

Nov 1st 2012: Minor updates including instructions on how to deploy this to the open source PaaS Cloudfoundry.

Modified the previous blog entry to work with Apache CXF instead of Jersey. Made modifications to the spring configuration XML to configure CXF as the restful service engine. The Maven pom.xml file was modified to include CXF libraries. Download the code from GitHub – https://github.com/thomasma/jaxrs-cxf-springsec.

Continue reading

Back to basics with maven, hibernate, spring, struts and…

It has been a while since I tried out the various products mentioned in the subject line together. Seems like after every long break from Maven I end up having to sit through hours finding out exactly which dependencies to include and which additional repository to include and of course hating myself at the end for spending time on another crud application. But its all good since as the title shows  its – back to basics. Gradle definitely shows more promise and I like where it is going very much. My only complain is with its lack of plugins for commonly used frameworks. Some of the hideous scripts that I have to include to make common plugins work was enough for me to hold off on this baby. I am sure more plugin support will follow. BTW I got my back to basics example working in multi-module mode. One module was for backend services and the other for webui. services jar gets included into the final web ui war file and all is good. Now next step is to create a multi-module project where the backend services is also a war with RESTful services. My thought here is to create the backend as standalone RESTful services and have any type of UI or other backend code be able to invoke it. End goal is to deploy the two wars to a cloud provider – maybe GAE (Google App Engine). Will try an android client too. Will post progress on this later.

 

BlockingQueue from java.util.concurrent package

There are times when you want, for performance reasons, one thread to produce objects and another one to consume it in parallel. You can definitely achieve this with the bare-bones thread API. But it might get a little messy depending on your exact use case (all that synchronize/wait/notify could drive you insane). And then what if the producer produces too fast and the consumer consumes too slow. Now you have too many objects queuing up in memory all waiting to get processed. Fear not – JDK Concurrent API is here to help.

Continue reading

CouchDB – The Schemaless Database

Most corporate databases used today are relational in nature. You have tables, columns, rows, column indexes, relations between tables using associated columns, etc. All this means you are dealing with structured data. Think banking systems, mortgage systems, customer and order tracking systems. These systems are well served with relational databases.

Now think about the systems that a lot of us deal with nowadays. Unstructured or semi-structured data as available in Social sites (facebook), wiki, blogs, news sites,etc. This data is clearly not relational in nature. Instead they are document-centric in nature. While some RDBMS can store this type of data, its not natural for them.

Continue reading

Apache Camel

Integrating systems in a complex enterprise landscape can get tough. You have all kinds of interactions going from one system to the other. Many of them taking in and spitting out different data formats. Which means you have to not only worry about the routing between these integrations but also the transformations between them. Updated to use Camel 2.11., Spring 3.2.2 and ActiveMQ 5.7.0. Continue reading