Archive for July, 2012

Advice From A JUG Leader – Learn A Different Language

July 12, 2012 Leave a comment

Advice From A JUG Leader – Learn A Different Language.

via Advice From A JUG Leader – Learn A Different Language.

Categories: Uncategorized

July 11, 2012 Leave a comment

Code Silo

In a earlier write up we saw how we can setup basic spring security. In this one we will see how to make a custom UserDetailsService instead of using the credentials in the configuration file. We will use MongoDB as a datasource.

We will use the project from the Spring Security project we created earlier and add the MongoDB config details and user service to provide the capability. See my previous blog for setting up MongoDB Spring Data.

Add the following to the mongo-config.xml file in the location WEB-INF/mongo/

Add the Spring Data dependencies in the pom.xml file

Add the mongo-config.xml file to the contextConfigLocation on web.xml. The context param will look like this

We will now create a CustomUserDetailsService class that implements UserDetailsService. We will add the implementation of loadUserByUsername method. The CustomUserDetailsService is as follows. The getUserDetail method queries to get the user object from MongoDB (it is…

View original post 101 more words

Categories: Uncategorized

July 11, 2012 Leave a comment

comSysto Blog

Over the last few weeks I got in touch with the fascinating field of data visualisation which offers great ways to play around with the perception of information.

In a more formal approach data visualisation denotes “The representation and presentation of data that exploits our visual perception abilities in order to amplify cognition

Nowadays there is a huge flood of information that hit’s us everyday. Enormous amounts of data collected from various sources are freely available on the internet. One of these data gargoyles is Twitter producing around 400 million (400 000 000!) tweets per day!

View original post 415 more words

Categories: Uncategorized

July 10, 2012 Leave a comment

Don't Make the Same Mistake Twice

You have picked up Mockito and you are interested in some good practices to avoid hangovers.

Don’t mix with Spring Integration Test

Mixing spring integration test and mockito can produce strange border effects like : singleton replaced by mocks,…
and will also lose the main benefit of mockito tests : speed !

Avoid abstract testcases

When something breaks it simply takes too long to diagnose.. An alternative is to create custom assertion and factory methods that can be reused.
-> prefer composition over inheritance.

Don’t mock your model

Prefer simply using your model

Over mocking it

Easier to read and you will may be add convenient contructor/factory methods to your production or test codebase… remember to put the code where it belongs.

Don’t abuse mocks

Mockito isn’t a Panacea. If all you have is a hammer, everything looks like a nail…

For example testing an xstream converter DescriptionTargetConverter

View original post 351 more words

Categories: Uncategorized

July 9, 2012 Leave a comment
Categories: Uncategorized

July 2, 2012 Leave a comment

What is coming to myhead

This is another tutorial of the category ‘quick start for absolute beginners’. This time the topic is on Play 2.0, Heroku and Scala. The reason for this tutorial is that recentannouncements indicate that the three topics will have a bright future together. A really nice overview of all three topics can be found in this presentation on slideshare (simply skip the Akka part. Or even better, read it as well!).

Play 2.0

As the time of writing Play 2.0 is still in beta status and according to the official homepage, APIs are likely to change a bit in the future. Nevertheless, I guess it is time to have a quick look into the new features of the framework and create a simple application.

Installing Play

As we would like to access all latest features, we are going to build Play from the source code ourselves. Therefore…

View original post 982 more words

Categories: Uncategorized

July 2, 2012 Leave a comment

Fabio Kung

Update: Heroku now does support Java.

Herokudoes not officially support Java applications yet (yes, it does). However, the most recently launched stack comes with support for Clojure. Well, if Heroku does run Clojure code, it is certainly running a JVM. Then why can we not deploy regular Java code on top of it?

I was playing with it today and found a way to do that. I admit, so far it is just a hack, but it is working fine. The best (?) part is that it should allow any maven-based Java Web Application to be deployed fairly easy. So, if your project can be built with maven, i.e. mvn package generates a WAR package for you, then you are ready to run on the fantastic Heroku Platform as a Service.

Wait. There is more. In these polyglot times, we all know that being able to run Java…

View original post 807 more words

Categories: Uncategorized