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

Java

  • submit to reddit

tools4j-config

I am proud to announce my open-source project tools4j-config; a project that will try to address configuration concerns in Java once and for all.

0 replies - 1291 views - 02/11/12 by Kristoffer Sjögren in Articles

Scala: Converting a scala collection to java.util.List

I’ve been playing around a little with Goose – a library for extracting the main body of text from web pages – and I thought I’d try converting some of the code to be more scala-esque in style.

0 replies - 579 views - 02/11/12 by Mark Needham in Articles

Resin: We Were Fast Before NginX

Netcraft released its February 2012 Web Server Survey, and Caucho's Resin Application Server has made incredible strides in the last year, gaining 4.2 million hostnames and accounting for 0.77% of the current market share.

0 replies - 1272 views - 02/10/12 by Christopher Smith in Articles

Java 7: A complete invokedynamic example

Another blog entry in my current Java 7 series. This time it's dealing with invokedynamic, a new bytecode instruction on the JVM for method invocation. The invokedynamic instruction allows dynamic linkage between a call site and the receiver of the call. That means you can link the class that is performing a method call to the class (and method) that is receiving the call at run-time. All the other JVM bytecode instructions for method invocation, like invokevirtual, hard-wire the target type information into your compilation, i.e. into your class file. Let's look at an example.

0 replies - 2136 views - 02/10/12 by Niklas Schlimm in Articles

Customizing Parameter Names When Binding Spring MVC Command Objects

With http parameter names, there is no way to customize them, which is odd, since this is meta-data, and it should be configurable using annotations. If you need to customize them (for example, for SEO reasons), you can plug some little pieces of code and Spring MVC will let you do it

0 replies - 905 views - 02/10/12 by Bozhidar Bozhanov in Articles

Tomcat 5.5 and Tomcat 6 connector option enableLookups not defaulting to true

I have been working on an issue where HttpServletRequest.getHostName() always return the IP address, instead of the host name.

1 replies - 926 views - 02/10/12 by Mick Knutson in Articles

Unreachable Catch Block - A Most Unobvious Bug

Earlier today I was working on some HTTP comms code adding a few changes, which are of no consequence here. One of the things that the code did was to read data from a server and, if the read failed, then it re-newed the connection and retried the read. The code ran something like this:

4 replies - 1476 views - 02/10/12 by Roger Hughes in Articles

Programming Language Popularity by SO and GitHub Cross-Ranking

See what you think of this new methodology for determining language popularity with stats from Stack Overflow, the developer question and answer site, and GitHub, a very popular open source repository.

0 replies - 5646 views - 02/09/12 by John Cook in Articles

Automatically generating WADL in Spring MVC REST application

Last time we have learnt the basics of WADL. The language itself is not as interesting to write a separate article about it, but the title of this article reveals why we needed that knowledge.

0 replies - 1443 views - 02/09/12 by Tomasz Nurkiewicz in Articles

Some Reporting tricks with class-transformations

Every time I used to see some duplication of code, I used to move that code to a new method. With Tapestry, you begin to think differently. Now every time I see duplication, my first thought is “Can I create a worker for it”. In my current project, I am using a few new ones. So I thought why not share them with you.

0 replies - 1004 views - 02/09/12 by Taha Siddiqi in Articles

The depths of Java: API leak exposed through covariance

Java can be very tricky some times, especially in API design. Let’s have a look at a very interesting showcase. jOOQ strongly separates API from implementation. All API is in the org.jooq package, and public. Most implementation is in the org.jooq.impl package and package-private. Only factories and some dedicated base implementations are public. This allows for very powerful package-level encapsulation, exposing mostly only interfaces to jOOQ users.

0 replies - 1893 views - 02/09/12 by Lukas Eder in Articles

Spring MVC Basics – Presentation

Here are the slides for my presentation during the first DZone VIP meetup in Bulgaria. The presentation is short, and the slides can definitely be better, but I’m sharing it anyway.

0 replies - 1328 views - 02/09/12 by Bozhidar Bozhanov in Articles

Implementing Spring MVC with CDI and Java EE 6 part 2

In this second article on implementing Spring MVC in Java EE 6 we’ll take the metadata we extracted in part one and use it to invoke request mapped controller methods in response to web requests and then direct the user to a web page based on the result of the method.

0 replies - 917 views - 02/09/12 by Andy Gibson in Articles

Why I Wrote Yet Another Java Bean Framework

With so many Java Bean XML and dependency injection frameworks out there – did I really need to write another? Am I suffering from some terrible ‘Not Invented Here’ syndrome?

1 replies - 3033 views - 02/08/12 by Rob Gordon in News

Pipes: The Data Flow Framework for Gremlin - GraphDB Traversal

Here's an example graph dataset to illustrate how Pipes works. Pipes is TinkerPop's dataflow framework that uses Gremlin, a graph traversal language. According to Marko Rodrigues, the pipes distribution includes multiple pipes that can be "mixed and matched to yield lazy graph traversals." This post includes plentiful cool Mario graphics.

0 replies - 3505 views - 02/08/12 by Marko Rodriguez in Articles