Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our YouTube channel to start Rocking right now!
Gain access to the industrys' best FREE video guides including:
1. Core Java guides
2. Enterprise Java guides
3. JVM insights, configuration and troubleshooting guides
4. Java performance guides
5. Java Interview Questions
and many more ....

Java Enum puzzler

Let’s suppose we have the following code: enum Case { CASE_ONE, CASE_TWO, CASE_THREE; private static final int counter; private int valueDependsOnCounter; static { int sum = 0; for(int i = 0; i<10; i++) { sum +=i; } counter = sum; } Case() { this.valueDependsOnCounter = counter*counter; } } What do you think is the result of compiling and running the ...

Read More »

Application Lifecycle Management at Eclipse

The Eclipse Foundation has evolved a pretty impressive application lifecycle management story. Based on what I’ve observed over the years, I believe that it’s completely reasonable to say that our ALM story is one of the best in the world: the envy of hundreds of open source projects and closed source development shops around the world. I believe that our ...

Read More »

JNDI and JPA without J2EE Container

java-interview-questions-answers

We wanted to test some JPA code with as simple setup as possible. The plan was to use only Java and Maven, without an application server or other J2EE container. Our JPA configuration needs two things to run successfully: database to store data, JNDI to access the database. This post has two parts. First part shows how to use standalone ...

Read More »

Lucene Overview Part One: Creating the Index

Introduction I’ve recently been working with the open source search engine Lucene. I’m no expert, but since I have just pored through some rather sparse documentation and migrated an application from a very old version of Lucene to the latest version, 2.4, I’m pretty clear on the big picture. The documentation for Lucene leaves a bit to the imagination, so ...

Read More »

MOXy as Your JAX-RS JSON Provider – Client Side

Recently I posted how to leverage EclipseLink JAXB (MOXy)‘s JSON binding to create a RESTful service.  In this post I will demonstrate how easy it is to take advantage of MOXy’s JSON binding on the client side. MOXy as Your JAX-RS JSON Provider – Server Side MOXy as Your JAX-RS JSON Provider – Client Side URI This post will focus ...

Read More »

Cost of Ownership Analysis: Oracle WebLogic Server vs. JBoss

A very interesting whitepaper by Crimson Consulting Group comparing the cost of ownership between Weblogic and JBoss. Although JBoss is free, the whitepaper has serious claims that on the long run Weblogic is cheaper. Although, this study was sponsored by Oracle, it seems to be very serious and definitely is worthy of a look. Below some interesting parts from the whitepaper: JBoss costs ...

Read More »

Can you get more out of Static Analysis?

When it comes to static analysis, Bill Pugh, software researcher and the father of Findbugs (the most popular static analysis tool for Java), is one of the few experts who is really worth listening to. He’s not out to hype the technology for commercial gain (Findbugs is a free, Open Source research project), and he provides a balanced perspective based ...

Read More »

Fork and join in Java 7 – JSR 166 concurrency utilities

One of the most interesting improvements of Java 7 is the better support of concurrency. With JSR 166 Concurrency Utilities we get some very helpful improvements of concurrency. From my point of view the fork-join library has a high potential for practical use in software engineering. Fork and join provides a very easy programming model for algorithms which can be ...

Read More »

TestNG and Maven configuration guide

To be useful automatic tests should run very fast. Otherwise will not be run often during development or even will be ignored in the default configuration on the developer workstations. The simplest rule it to write only small unit tests which test given class having the neighborhood mocked. Nevertheless sometimes it is useful/required to test something in IoC container context ...

Read More »