All-You-Can-Gulp Steamin' Hot Hard-Core Java! No-compromise, professional, non-newbie tips, tricks and solutions. You're invited to join!

Friday, November 11, 2005

Impressive performance boost for Client HotSpot VM

Through comes news of a new post by Osvaldo Pinali Doederlein. The post brings the welcome news of a new register allocator for the Client version of the HotSpot VM making it into the latest build of Mustang. The new register allocator brings a mighty 58% perfomance boost to this most widespread version of the HotSpot VM.

Wednesday, November 02, 2005

Gilad Bracha on suggested VM bytecode

Dynamically typed language lovers rejoice!

A bytecode, named "invokedynamic" was suggested in late september by VM guru Gilad Bracha in this blog post. The new JVM instruction will enable more efficient implementations of languages such as Python, Ruby, etc. on top of the JVM. The improvement will come from the ability to call a class' method without type-checking, which will reduce the need for a reflection-based implementation of dynamic-typing on top of the JVM. Errors will be trapped post-facto.

Bracha will chair the relevant JSR. Don't hold your breath though, I doubt we'll see this incorporated in the JVM in time for Mustang...

Wednesday, September 07, 2005

Long time no post...

We're back... A busy year it has been. Regular posts to return soon, we hope.

Sunday, February 15, 2004

Effective Unit Testing with DbUnit

My team-leader Yuval Koren has pointed my way to this article at Its a nice overview of an extension to JUnit, called DbUnit that allows easy unit testing of code that interacts with a database.

Thursday, February 05, 2004

JDK 1.5 (Tiger) beta released!

Its finally here, the most exciting release of the JDK since 1.2 is here-- JDK 1.5 tiger roars its beta roar... See a full list of the new features. Download it here. Can't wait to play with it!

Return of the Gosling

James Gosling is back! Gosling has returned to head the development of Java (and tools). Hurrah :)

Thursday, January 22, 2004

A little plug of my own

Some of you already know of my little open-source project. Those that don't, check out DOM ResultSet Wrapper. Basically it is what it sounds like, it efficiently serves as a DOM interface adapter to a JDBC ResultSet. Allowing you to perform XPaths and XSLT on the resulting query.

Kito Mann on JavaServer Faces

My co-worker Dovik Nissim, pointed my way to this interview with Kitto Mann on JavaServer Faces posted at, especially with regards to migrating from Struts and other frameworks etc.

XpoLog Xtrim 1.0 released

XpoLog announced the release of Xtrim
Xtrim is a powerfull log-analyzer / viewer and many other features.
Disclosure: Haim is the founder of XpoLog.

Wednesday, January 21, 2004

Lame patent

It seems that IBM has patented the MVC approach as it applies to Java Servlets and JSPs...How silly.
This is especially silly, considering that the patent was filed June 17, 2003, and we all know how long before that Struts was released... From what I could decipher from that patent's legalese seems to me like Struts can serve as perfect prior-art for this patent.
Mark another one for abuse of the U.S. patent system.

Saturday, November 22, 2003

Web frameworks

If you want to understand the differences between different web-frameworks for Java, here is a brief summary:

Model-View-Controller based. The model is your EJB/other data, the View are JSP pages and the Controller is a combination of an XML file and code grouped in 'Action' objects. Provides helper classes that will automatically make JSP form data available to the developer in a Java object (instead of parsing the request parameters etc.). Still cumbersome to develop in.

The application flow is determined as in Struts -- actually Struts can even be used as a drop-in controller.
Server-based stateful components. But application flow control is still cumbersomely defined in 'Action' style objects.
Difficult to create reusable components.
Layout still done the JSP way (even though it is with a specialized tag library) or with XML (as with Oracle's UIX).

From component level to application flow level, it is object-oriented and event-based.
If you've ever programmed in AWT/Swing/SWT or any other 'event listener' or 'signal-slot' architecture you will be comfortable with Echo.
You layout your UI the object oriented way, with components. A new WYSIWYG editor coming soon will make this even easier.
Very easy to create reusable components and even sub-applications. The framework takes care of rendering your application to HTML and translating the user's actions to meaningful server-side events.

Tuesday, September 16, 2003


Even better -- Check out Echo, as pointed to me by the Slashdot article: "Building Rich-Client-Like Web Apps With Echo".

Sunday, August 31, 2003

JavaServer Faces

Get excited about JSR-127, the JavaServer Faces specification!
It is finally what I've been waiting for regarding client UI. Basically it allows you to define your UI as a set of components interacting with a model (i.e. Swing, SWT, AWT etc. etc.) even if the UI is rendered as a JSP -- ala .NET Forms, except platform independent and Java based. I'll be providing updates as I learn more about this new technology.

Sunday, August 17, 2003


I am very impressed with this tiny but useful open source library called Domify. Their site says it best:
"Domify eliminates the need to generate XML manually by wrapping Java objects in an adapter which provides a W3C DOM interface. As client code navigates the DOM tree, the Domify code navigates the object graph using introspection."

Sunday, August 03, 2003

Java performance tuning

Interesting article at IBM's developerWorks on Java performance and improving it.

Tuesday, July 29, 2003

IBM JDK vs. Sun's

Andrew C. Oliver's 'Hacking Log 3.0' has brought to my attention "... this post by Werener Ramaekers which points to this performance report..." -- Interesting, IBM's JDK seems to beat Sun's by a large margin.

Friday, June 13, 2003

New Java sites

A Slashdot article about Sun's new and sites.

Thursday, June 12, 2003

Languages and the thinking style they employ

Old (May, 2003) yet very interesting blog post by Carlos E. Perez, regarding languages and the thinking style they employ.

Saturday, May 31, 2003

Tigher growls

Slashdot is reporting that Sun has released a preview (registration req.) of Tiger (Java 1.5) with the suggested new features implemented (generics, type-safe enums, etc.)

Thursday, May 22, 2003

Utility Function of the Day

There hasn't been a utility function of the day for a long time around here, so this one is extra special.
The following method calculates a digest for a DOM hierarchy including attribute values and text content. The special part about it is that it ignores ordering of elements and attributes and disregards comments completely.

The Code:

* Recursively calculate DOM digest,
* disregarding order but taking all content except
* comments into consideration.
* @param node The node to start with
public static long digestDOM(Node node)
long digest = 0L;

* First calculate the 'self' digest
if (node instanceof Attr)
Attr attr = (Attr) node;

digest = attr.getName().hashCode() + attr.getValue().hashCode();
else if (node instanceof Text)
Text text = (Text) node;

digest = XMLUtils.getContent(text).hashCode();
else if (node instanceof Element)
Element element = (Element) node;

digest = element.getTagName().hashCode();

* Now calculate the attribute's digest, disregarding order
long attributeDigest = 0L;

NamedNodeMap attributes = node.getAttributes();

if (attributes != null)
* Iterate through a node list, examine only elements
int attributeCount = attributes.getLength();

for (int i = 0; i < attributeCount; i++)
Node currentNode = attributes.item(i);

attributeDigest += digestDOM(currentNode);

* Append the attribute digest
digest = (digest * 2 + (attributeDigest));

* Then calculate the children, disregarding ordering
long childrenDigest = 0L;

* Iterate through a node list, examine only elements

NodeList childNodes = node.getChildNodes();

int nodeCount = childNodes.getLength();

for (int i = 0; i < nodeCount; i++)
Node currentNode = childNodes.item(i);

childrenDigest += digestDOM(currentNode);

* Append the children digest
digest = (digest * 4 + (childrenDigest));

return digest;


Saturday, May 10, 2003

Tiger purrs

Slashdot has pointed my attention to an Q&A article on Sun's Java site, regarding the new features expected in JDK 1.5. We've reported on this already, but what the heck.

Wednesday, March 19, 2003

Project Rave

I've missed an interesting article at Slashdot two days ago. Check it out if you are interested in Sun's plan to provide Visual Basic-like tools for Java.

Tuesday, March 11, 2003

JDK 1.4.1 for Mac OS X

Finally... :)
Mac OS X Java developers have been anxious for this and it is finally here -- Apple has released JDK 1.4.1 for Mac OS X. [Thanks Slashdot]

Monday, March 03, 2003

Object Prevalence

This post on Slashdot brings lights to the Object Prevalence concept. Object Prevalence is a simple, smart solution to many problems that have been plaguing modern enterprise projects. Notably those of maintaining persistency and thus transactional integrity with objects and object hierarchies (or graphs), which by definition do not fit RDBMs.

Sunday, February 16, 2003

1.4.1 JDK for Linux on x86 and SPARC

Slashdot is reporting that the good people at the Blackdown project have released their version of the 1.4.1 JDK, for Linux on x86 and SPARC. Congratulations!