Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

and many more ....

 

Apache Camel Cheatsheet

apache-camel-logo

                      Polling an empty directory (and send an empty message with null body) : from('file://temp?sendEmptyMessageWhenIdle=true') Stop a route : .process(new Processor() { public void process(Exchange exchange) throws Exception { getContext().stopRoute('ROUTE_ID'); } }) Access a property of the object in the body : admitting the object has a method named ‘getMydata()’ ...

Read More »

Caveats With MySQL Pagination

mysql-logo

We’ve all done pagination – it’s sensible for both lists in the UI and for processing data in batches. “SELECT (columns) FROM table LIMIT X, Y”. Possibly “SELECT (columns) FROM table ORDER BY some_column LIMIT X, Y”. What’s the caveat? Especially when working with an ORM and when processing batches, where order doesn’t matter, you are likely to omit the ...

Read More »

How to shoot yourself in foot with ThreadLocals

java-logo

It will start nicely. Like most of the stories. You discover a new concept and are amazed by it’s powers. And then equipped with this new hammer suddenly everything starts to look like a nail. From what we have experienced in past months, java.lang.ThreadLocal makes one hell of a hammer. I guess it all boils down to the very concept ...

Read More »

Going REST: embedding Jetty with Spring and JAX-RS (Apache CXF)

codehaus-jetty-logo

For hardcore server-side Java developer the only way to ‘speak’ out to the world is by using APIs. Today’s post is all about JAX-RS: writing and exposing RESTful services using Java. But we won’t do that using a traditional, heavyweight approach involving application server, WAR packaging and whatnot. Instead, we will use awesome Apache CXF framework and as always rely ...

Read More »

Mixin in Java with Aspects – for a Scala traits sample

java-interview-questions-answers

Scala traits allow new behaviors to be mixed into a class. Consider two traits to add auditing and version related fields to JPA entities:                   package mvcsample.domain import javax.persistence.Version import scala.reflect.BeanProperty import java.util.Date trait Versionable { @Version @BeanProperty var version: Int = _ } trait Auditable { @BeanProperty var createdAt: Date = ...

Read More »

MySql connections autodrop after a certain hours

mysql-logo

MySql is configured to drop any connection which has been Idle for more than 8 hours. What is the implication of this? After you return to your deployed app after a gap of 8 hours (If default SQL parameters have not been changed), you will be greeted with an exception. How to solve this issue? Increase the wait_time parameter -Not ...

Read More »

The Lazy Developer’s Way to an Up-To-Date Libraries List

gradle-logo

Last time I shared some tips on how to use libraries well. I now want to delve deeper into one of those: Know What Libraries You Use. Last week I set out to create such a list of embedded components for our product. This is a requirement for our Security Development Lifecycle (SDL). However, it’s not a fun task. As ...

Read More »

Brace yourselves – Spring Framework 4.0 is coming!

spring-interview-questions-answers

A few days ago SpringSource announced that the 4.0 version of the popular Spring framework is on the road. The next iteration will be Spring Framework 4.0! As SpringSource states, the focus of the upcoming version is on “emerging enterprise themes in 2013 and beyond”: Support for Java SE 8 Spring applications Configuring and implementing Spring-style applications using Groovy 2 ...

Read More »

Scala: call me by my name please?

scala-logo

In Java, when frameworks such as log4J became popular in Java architectures it was a common occurence to see code such as:                   if (logger.isEnabledFor(Logger.INFO)) { // Ok to log now. logger.info('ok' + 'to' + 'concatenate' + 'string' + 'to' + 'log' + 'message'); } It was considered best practice to always ...

Read More »

Frankensystems, Half-Strangled Zombies and other Monsters

software-development-2-logo

There are lots of ugly things that can happen to a system over time. This is what the arguments over technical debt are all about – how to keep code from getting ugly and fragile and hard to understand and more expensive to maintain over time, because of sloppiness and short-sighted decision making. But some of the ugliest things that ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close