Home » 2012 (page 20)

Yearly Archives: 2012

java.lang.ClassNotFoundException: How to resolve


This article is intended for Java beginners currently facing java.lang.ClassNotFoundException challenges. It will provide you with an overview of this common Java exception, a sample Java program to support your learning process and resolution strategies. If you are interested on more advanced class loader related problems, I recommended that you review my article series on java.lang.NoClassDefFoundError since these Java exceptions ...

Read More »

Invaluable books for an enterprise software engineer


I am again in the design phase of a very large project. The project context is to provide a new solution for the core services and core integration infrastructure around the prepaid platform on the largest telecommunication organisation in Greece. This is the most intrinsic motivation for me, define the essential architecture, spot the tricky points of requirements and provide ...

Read More »

Health Checks, Run-time Asserts and Monkey Armies


After going live, we started building health checks into the system – run-time checks on operational dependencies and status to ensure that the system is setup and running correctly. Over time we have continued to add more run-time checks and tests as we have run into problems, to help make sure that these problems don’t happen again. This is more ...

Read More »

become/unbecome – discovering Akka


Sometimes our actor needs to react differently based on its internal state. Typically receiving some specific message causes the state transition which, in turns, changes the way subsequent messages should be handled. Another message restores the original state and thus – the way messages were handled before. In the previous article we implemented RandomOrgBuffer actor based on waitingForResponse flag. It ...

Read More »

JUnit4 Parameterized and Theories Examples


I always relied on TestNG to pass parameters to test methods in order to give a bit of flexibility to my tests or suites. However, the same flexibility can be achieved using JUnit4. To use it it’s simple:               package com.marco.test; import java.util.Arrays; import java.util.Collection; import junit.framework.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import ...

Read More »

Gang of Four – Proxy Design Pattern


Proxy is another Structural design pattern which works ‘on behalf of’ or ‘in place of’ another object in order to access the later. When to use this pattern? Proxy pattern is used when we need to create a wrapper to cover the main object’s complexity from the client. What are the usage scenarios? Virtual Proxy – Imagine a situation where ...

Read More »

Java Regular Expression Tutorial with Examples


When I started my career in java, regular expressions were a nightmare for me. This tutorial is aimed to help you mastering java regular expression and for me to come back at regular interval to refresh my regular expressions learning. What Are Regular Expressions? A regular expression defines a pattern for a String. Regular Expressions can be used to search, ...

Read More »

Spring MVC REST Calls With Ajax


This post provides a simple example of REST calls to a Spring MVC web application. It is based on the Serving Static Resources With Spring MVC and Fetching JSON With Ajax In Spring MVC Context example. The code is  available on GitHub in the Spring-REST-With-Ajax directory. Main Page Our main page contains four buttons linked to Javascript functions performing Ajax calls:       ...

Read More »

Spring 3.1 – Loading Properties For XML Configuration From Database


Spring makes it easy to inject values obtained from properties files via its PropertyPlaceholderConfigurer and (pre-Spring 3.1) PropertySourcesPlaceholderConfigurer (Spring 3.1). These classes implement the BeanFactoryPostProcessor interface, which enables them to manipulate the values within the Spring XML configuration file before the beans are initialized. So if you specify ${jdbc.driverClassName} to be set to the property ‘driverClassName’, this variable will be ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.