Monthly Archive:: January 2013

JUnit Assert: Which One to Choose?

Unit tests, the bane of any engineers day, but a necessity and something that has proven itself to me over time to be invaluable if done correctly. For any developer that has just sat down to write their first test they may be confronted with the following problem when trying to use JUnit’s Assert functionality. [&hellip

Read More…

Scaling: Horizontally and Vertically

In a recent post focusing on the use of NoSQL I mentioned the practice of scaling (horizontally). In this post I will briefly expand on the two types of scaling available. Vertical scaling (scale up) Vertical scaling, typically refers to adding more resources to a system in the form of addition of CPUs, memory and [&hellip

Read More…

NoSQL: When to Leverage the Future

1. Dealing with big, big data With hardware costs decreasing daily (excluding acts of nature, see Thailand floods), building a massive server for a relational database is an viable option for many companies. But vertical scaling has its limits, and horizontally scaling some of the most popular relational databases is painful…so very painful, if possible [&hellip

Read More…

@Inject vs @Autowired

The annotation @Inject (javax.inject.Inject) is part of the Java CDI standard introduced in Java EE 6 (JSR-330), which Spring has chosen to support using @Inject synonymously with their own @Autowired annotation. The annotation @Autowired is springs own annotation. @Inject is part of a new Java technology called CDI that defines a standard for dependency injection [&hellip

Read More…

Development Environments: From Local to Production and Everything In-between.

Within every enterprise development company, whether it be a SMB or a large multinational company, the makeup of its development environment is crucial to the quality and success of a project. Here I will detail the development environments any company should implement to improve their life cycle process: Sandbox Local setup of a development environment [&hellip

Read More…

Spring Autowiring using @Qualifier

In Spring, the annotation @Qualifier specifies which bean is autowired on a field. The following scenario shows an instance where using @Autowired alone is not sufficent. Autowiring Example See below example, it will autowired a “person” bean into customer’s person property. But, two similar beans “ie.markreddy.Person” are declared in bean configuration file. Will Spring know [&hellip

Read More…

Unit Test Hanging During Sonar Analysis (JMockit, Maven, Sonar, JaCoCo and Jenkins)

Recently I  deployed a new batch of unit tests based on the JMockit framework in our new Jenkins + Sonar environment and after building successfully the tests were hanging during sonar analysis. Even the tests that don’t use JMockit (simple JUnit) stopped to work. It was strange that during the build phase with test there was no problem [&hellip

Read More…