Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Java

  • submit to reddit
James Sugrue04/26/12
2079 views
8 replies

Thursday Code Puzzler: Finding Twin Primes

Time for our weekly code puzzle. The idea is simple: solve the coding problem as efficiently as you can, in any language or framework that you think is suitable. Today problem is to find all the twin primes within a certain range.

Tom Jefferys04/25/12
2992 views
0 replies

Multimaps - Google Guava

I first came across Guava whilst searching for generic versions of Apache Commons Collections - I needed a Bimap and was fed up with having to pepper my code with casts - however what I found was much much better.

Bozhidar Bozhanov04/25/12
1556 views
0 replies

Replacing a JSON Message Converter With MessagePack

You may be using JSON to transfer data (we were using it in our message queue). While this is good, it has the only benefit of being human-readable. If you don’t care about readability, you’d probably want to use a more efficient serialization mechanism.

Łukasz Budnik04/25/12
2636 views
0 replies

Running Maven Applications on OpenShift PaaS

As a proof of concept I decided to deploy my Apache Camel route (with Apache CXF endpoint as a front-end) and run Maven on Red Hat's OpenShift PaaS.

Ben O' Day04/25/12
2495 views
0 replies

Camel Exception Handling Overview for a Java DSL

Here are some notes on adding Camel exception handling to a JavaDSL route. There are various approaches/options available. These notes cover the important distinctions between approaches...

Gordon Dickens04/24/12
2107 views
0 replies

What is in My Cloud Environment?

I put together Java sample applications using Spring 3.1. Using Spring’s Environment abstractions, we can gather details about the underlying platform.

Tom Jefferys04/24/12
4726 views
6 replies

Guava Splitter vs StringUtils

I decided to compare Guava's Splitter with StringUtils, and I have to admit I was surprised at what I found.

Michael Mainguy04/24/12
13105 views
6 replies

All Java Architects: Read This

I have a couple of quick notes for any aspiring java architects. Please read them carefully and think about them.

Blaise Doughan04/24/12
1571 views
0 replies

Binding to JSON & XML - Handling Null

By default a JAXB (JSR-222) implementation will not include a mapped field/property with a null value in the output. If you want the null value represented then you simply add the following annotation @XmlElement(nillable=true).

Nikita Salnikov...04/24/12
1901 views
0 replies

I Want to Estimate the Time it Takes to Solve a Memory Leak!

Throughout a decade of being responsible for delivering various IT projects I have involuntarily developed a reflex - whenever I hear someone saying "Our application has a memory leak", I immediately get shivers running down my spine.

Nicolas Frankel04/24/12
1398 views
0 replies

Native Mobile Vaadin

With all buzz surrounding native mobile applications, an article was to tackle the subject. Given iOS proprietary nature, this article will show us how to wrap a Android application around a Vaadin one. Be warned, this means there will be more talk about Android than Vaadin. The first step is to create a simple WebView in XML.

Stoimen Popov04/24/12
7871 views
3 replies

Algorithm of the Week: How to Determine the Day of the Week

Do you know what day of the week was the day you were born? Monday or maybe Saturday? What about January 31st, 1883? Well, Stoimen Popov has created this post to explain a useful algorithm for determining what day of the week a certain date falls on.

Mark Needham04/24/12
2362 views
0 replies

Neo4J: Searching for Nodes by Name With Lucene Autocomplete

I’ve been graphing connections between ThoughtWorks people using neo4j and wanted to build auto complete functionality so I can search for the names of people in the graph. The solution I came up was to create a Lucene index with an entry for each node and a common property on each document in the index.

Carl Dea04/23/12
2140 views
0 replies

JavaFX 2 Game Tutorial Part 2

The game is called Atom Smasher where you generate atoms (spheres) that collide. You may freeze the game to add more atoms.

Billy Sjöberg04/23/12
3907 views
3 replies

Bridging between JMS and RabbitMQ (AMQP) using Spring Integration

Although I know that RabbitMQ has the shovel plugin which can bridge between Rabbit instances I've yet not found a good plugin for JMS <-> AMQP forwarding. The first thing that came to my mind was to utilize a Spring Integration mediation as SI has excellent support for both JMS and Rabbit.