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 ....

JAXB – No Annotations Required

java-interview-questions-answers

There appears to be a misconception that annotations are required on the model in order to use a JAXB (JSR-222) implementation. The truth is that JAXB is configuration by exception, so annotations are only required when you want to override default behaviour. In this example I’ll demonstrate how to use JAXB without providing any metadata. Domain Model I will use ...

Read More »

Answering with Mockito

mockito-logo

When you are writing unit tests, you must keep in mind to not have dependencies to external components. To avoid this we use mock frameworks which for me the easiest one to use is Mockito. In this post we are going to see an ‘advanced’ technique used in Mockito to return same argument instance on a mocked method using Answer ...

Read More »

Hash Length Extension Attacks

java-logo

In this post I will try to leave the summer slump behind and focus on more interesting things than complaining about the weather – hash length extension attacks. Hash length extension attacks are nothing complicated or high sophisticated, to be honest it is just about how to use hash functions. As discussed in one of my former posts there are ...

Read More »

EclipseLink MOXy as a JAXB provider

eclipselink-logo

EclipseLink MOXy is a JAXB provider and is a compelling alternative to the default JAXB provider built into JDK. First a simple test to marshal a Java object to XML: This is the model: @XmlRootElement(name='MemberDetailsRequest', namespace='http://bk.org/memberservice/') @XmlAccessorType(XmlAccessType.FIELD) public class MemberDetailsRequest { public MemberDetailsRequest() { } public MemberDetailsRequest(Long id) { this.id = id; } private Long id; public Long getId() { ...

Read More »

Spring Integration – Session 2 – More Hello Worlds

spring-interview-questions-answers

This is a follow up to Spring Integration Session 1 The first session was a simple Hello World application using Spring Integration. I want to take it a little further by considering a few more scenarios around it. So the first change to the Hello World application is to add in a Gateway component. To quickly revisit the earlier test ...

Read More »

String memory internals

java-logo

This article is based on my answer on StackOverflow. I am trying to explain how String class stores the texts, how interning and constant pool works. The main point to understand here is the distinction between String Java object and its contents – char[] under private value field. String is basically a wrapper around char[] array, encapsulating it and making ...

Read More »

Database Abstraction and SQL Injection

software-development-2-logo

I have subscribed to various user groups of jOOQ’s competing database abstraction tools. One of which is ActiveJDBC, a Java implementation of Active Record design pattern. Its maintainer Igor Polevoy recently claimed that: SQL injection is a web application problem, and not directly related to an ORM. ActiveJDBC will process any SQL that is passed to it. (See the discussion ...

Read More »

Stop Crapping on Start-Ups

career-logo

Michael O. Church recently wrote a thought provoking blog post, “Don’t Waste Your Time in Crappy Startup Jobs“, and the author clearly put a lot of thought into writing the piece. Based on the comments and the retweets, it appears the article hit home for quite a few people. I think the article’s title might sway a reader’s interpretation a ...

Read More »

Java talking to iOS: Java objects to Apple plist serialization

java-interview-questions-answers

I am happy to announce my first open source project java-plist-serializer that can help you with integrating Java and especially Spring based applications with iOS applications.   Background I am working on project that has Java webapp as a backend and clients are iOS devices. Recently I’ve received task to create Web Service that returns plist – Property List data ...

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