In this nice OnJava article Amir Shevat shows a way to scale an application in a near painless and lightweight manner using the OS MantaRay messaging middleware package. Interesting how this compares to EJB or Webservices (and WSIF) – when deployed to fix the scaling problem -, by keeping the […]
Jasper
XSLT is Way Faster Using Java 5
Interesting post by Dino Fancellu on SoftwareReality.com, XSLT is Way Faster Using Java 5, talks about how by replacing Xalan by XSLTC and Crimson by Xerces Sun JDK 5.0 (1.5.0_01) is 5.59 times faster than Sun JDK 1.4.2 when performing a simple transformation. JRockit 5, BEA’s own Java 5 compatible […]
jWebUnit
During my current project, i encountered jWebUnit, a unittesting framework based on jUnit and HttpUnit. Old news for some, new for me. Since we already had some posts on jUnit and HttpUnit, i thought this might be of interest. An example of its conciseness (as found on the jWebUnit homepage):
Using Struts' nested indexed properties in a form with table-layout
It looks like trying to use Struts’ nested indexed properties in a form with table-layout, with every line (a few formfields) as an editable separate entity, has driven a lot of people (including me) nuts. With nothing about it in the manual, and no answers to be found on the […]
Easy toString/equals/hashcode
A simple, standard and reusable way of creating toString, equals and hashcode methods in your classes/beans can be found in the jakarta commons.lang package: import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; public class BaseBean { public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); } public boolean equals(Object o) { return […]
New Oracle JDBC driver
After getting a weird NullPointerException using Transaction.commit() in Hibernate during an insert (eventually calling PreparedStatement.clearParameters() which was the source of the exception), it turned out that the JDBC driver in classes12.jar is outdated, and will not work on JDK1.4 and an Oracle 10g database. Download the new drivers here to […]
Hibernate kickstart
A quick’n dirty tutorial-by-example for Hibernate: (Using one table, an Oracle9+ database and Hibernate2) 1) download the Hibernate distribution 2) put these jarfiles in /WEB-INF/lib: hibernate2.jar (hibernate core) cglib-full-2.0.2.jar (runtime class-enhancing) dom4j-1.4.jar (xml reading) ehcache-0.9.jar (objectcache) c3p0-0.8.4.5.jar (connectionpool) jta.jar (transactions)
Some Hibernate links to get started
Some links to get started with Hibernate: Quickstart with Tomcat "Hibernate Your Data" – ONJava Quickstart Configuration Properties Hibern8IDE
EJB threshold
Years ago, i believe Q4-2000, we made a website that almost from the day it went live had to serve some rather heavy content with 30.000 hits a day. We finally settled on a cluster of 3 Tomcat-4 servers, 2 MySQL DBs, some homebrewed caching (site was read-mostly), some light […]
O/R mapping tools – comparison
For a very extensive comparison between seemingly all the O/R mapping tools known to mankind check this wiki page. Perhaps a relevant observation: despite the zealoting, Toplink, OJB and Hibernate (by far _the_ most popular ORM-tool, and the basis for EJB3) all seem to offer roughly the same functionality. And […]
Interview Bruce Tate
A very good, thoughtprovoking interview on EJB3, lightweight containers and AOP with Bruce Tate (author of Bitter Java, Bitter EJB and his latest, Better, Faster, Lighter Java) can be found here.
Eclipse webtools
The Eclipse webtools subplatform is live, with two initial code submissions from Lomboz and IBM. More info here. The submission by IBM is looking _really_ good: it’s like a free version of WSAD (WebSphere Studio Application Developer). Must delve deeper into this before making any conclusive comments though. While on […]
Exception-handling in Struts
For a simple and generic solution to the boring and code-aesthetics ruining routine of catching rare exceptions in your Struts-actions, try a global exceptionhandler.
A Generic MVC Model in Java
An interesting article about reducing the amount of code needed to implement a certain objectmodel, using JDK1.5’s generics. “Model-View-Controller (MVC) is a widely used design pattern, especially popular in graphical user interface (GUI) programming. JDK 1.5 introduces parameterized types, or generics. Combining the two allows for a generic implementation of […]
ServletUnit
ServletUnit is a thin layer around the HttpUnit framework (reviewed here). An excerpt from the page: “As a testing tool, HttpUnit is primarily designed for “black-box” testing of web sites. In many cases that may be all you need; however, if you are developing complex servlets, you may wish to […]
HttpUnit
First of all, although the name suggests otherwise, HttpUnit is NOT a unit-testing framework. What is it then? Well, read this excerpt from the HttpUnit site: “HttpUnit emulates the relevant portions of browser behavior, including form submission, JavaScript, basic http authentication, cookies and automatic page redirection, and allows Java test […]
Eclipse 3.0
After a promising start, getting me all enthousiastic about the new features described in the “what’s new” document, Eclipse 3.0 got to a grinding halt when i tried to create a simple helloworld class. It was extremely slow, even getting to the point that it wasn’t workable anymore. Switched back […]