Asynchronous HTTP and Comet architectures
There's a lot more to asynchronous, non-blocking HTTP than Comet. Get
an overview of the programming techniques and servlet container extensions that are breathing new life into HTTP on the server
side, with or without the support of the Java Servlet API.
Gregor Roth,
March 2008
Asynchronous HTTP Comet architectures
There's a lot more to asynchronous, non-blocking HTTP than Comet. Get
an overview of the programming techniques and servlet container extensions that are breathing new life into HTTP on the server
side, with or without the support of the Java Servlet API.
Gregor Roth,
March 2008
The AjaxComponent strategy for JSF: The best of both worlds
If you're looking to add Ajax functionality to your JSF applications, the AjaxComponent strategy provides the simplicity of
a component and the power of a phase listener.
Matthew Tyson,
December 2007
Exceptions for action
Is your code overloaded with exceptions? Get some guidelines for writing efficient, reusable exceptions that minimize processing
overhead without leaving users or sysadmins in the dark.
Jean-Pierre Norguet,
November 2007
REST easy with the JavaBeans Activation Framework
Find out what makes the JavaBeans Activation Framework a perfect vehicle for RESTful data transmission, then put JAF to work
in a sample Web application that tracks requests and responses through a Java Servlet-based system.
Jeff Hanson,
October 2007
Add dynamic Java code to your application
Did you ever wish your Java code could be dynamic like JavaServer
Pages? That it could be modified and recompiled at runtime, with
your application updating itself on the fly? This article shows you
how to make your code dynamic. As such, some of your source code
will be deployed, instead of compiled binary code. Any changes to
the source code will cause it to be recompiled and the class to be
reloaded. Your application will then run on the new class, and
users will see the change immediately. This article covers not only
runtime source compilation and class reloading, but also a design
that separates the dynamic code from its caller. The caller holds a
static reference to the dynamic code, and no matter how the dynamic
code reloads at runtime, the caller can always access the
up-to-date class without updating the reference. In this way,
dynamic code changes are transparent to the client.
Li Yang,
June 2006
Plug memory leaks in enterprise Java applications
Because Java uses automatic garbage collection, developers think
Java programs are free from possible memory leaks. Although
automatic garbage collection solves the main cause of memory leaks,
they can remain in a Java program. Specifically, such memory leaks
in complex multitiered applications can be extremely daunting to
detect and plug. This article analyzes the main causes of memory
leaks in Java Enterprise Edition (Java EE) applications, and
suggests strategies for detecting them.
Ambily Pankajakshan,
March 2006
J2EE design decisions
In this article, an excerpt from POJOs in
Action (Manning Publications, January 2006), Chris
Richardson presents five questions developers must ask themselves
when designing enterprise applications.
Chris Richardson,
January 2006
Generically chain dynamic proxies
Most developers already know how to decorate a business object and
add additional behavior to it at runtime. The Gang of Four (GoF)
Decorator pattern helps developers achieve this functionality.
Under the reflection package, J2SE 1.3 introduced the dynamic
proxy, which dynamically decorates business objects. Additionally,
chaining dynamic proxies can add multiple behaviors to business
objects dynamically at runtime. More specifically, these types of
additional behaviors are addressed by aspect-oriented programming
(AOP). This article is not intended as an in-depth discussion on
AOP; rather, it focuses on generically chaining the dynamic proxies
so that the developer can implement some AOP concepts in a
framework-driven way. If a project is already using some existing
AOP framework, then the developer does not need to worry about
implementing a custom framework. But developers who, for whatever
reason, do not use these frameworks in their projects can still get
the advantage of chaining dynamic proxies in an effective way with
little effort.
Srijeeb Roy,
January 2006
Design an MVC framework using annotations
Model-View-Controller (MVC) is a software architecture that
separates an application's data model, user interface, and control
logic into distinct components so that modifications to one of the
components can be made with minimal impact to the others. In this
article, you learn how to design a framework that extends MVC and
uses annotations to achieve an (almost) complete decoupling between
the model and view.
Riccardo Govoni,
October 2005
Hook on to Jakarta Commons Chain
The Jakarta Commons Chain framework is a fairly new framework that
implements the Chain of Responsibility pattern. In this article,
the basics of the framework are discussed, starting with the
interfaces Command, Chain, and
Catalog. In addition, the reader is introduced to some
packages designed for use in Web applications and learns how
Commons Chain will be applied in an upcoming version of Struts.
Finally, some imperfections are mentioned that are still present at
the time of this writing.
Eric Gunnewegh,
July 2005
Use Spring to create a simple workflow engine
Spring is a framework that promotes a relatively new programming
paradigm known as Inversion of Control. This article deploys Spring
in a more general-purpose role as a simplistic workflow engine. A
straightforward investigation into workflow is followed by the
presentation of a Spring-based workflow API usable in basic
workflow scenarios.
Steve Dodge,
April 2005
Create an application-wide user session for J2EE
Despite its comprehensive sets of APIs for writing distributed
applications, J2EE does not provide an application-wide session.
While Web applications can use the HttpSession facility, this
context won't automatically carry over to Enterprise JavaBeans or
J2EE clients. By combining code generation with a mixture of
aspect-oriented programming and a hint of design patterns, it is
possible to provide such a context across components in an
enterprise application and hide most of the complexity from the
developer. This article shows you how.
Kåre Kjelstrøm,
March 2005
Boost Tomcat performance for static content
PippoProxy is a 100 percent pure Java HTTP proxy designed and
implemented for Tomcat that can be used instead of standard
Apache-Tomcat solutions. It addresses the need for a Java HTTP
proxy in those cases where standard Apache-Tomcat configurations
cannot be deployed because of internal security policies, because
no Apache Web server is available, or because higher performance is
required. Thanks to its static content caching, PippoProxy provides
a higher performance for static content delivery. It does not
require any optional modules or even a Web server for connecting
Tomcat, and it can be easily configured and deployed using Apache
Ant.
Gino Tesei,
February 2005
Let your Ant enjoy Spring
This article presents an Ant task extension that allows the
invocation of an IoC (Inversion of Control) managed object or any
unmanaged object. It also shows how OGNL (Object Graph Navigation
Language) can be used to easily let Ant invoke any method
expression, including those with runtime arguments. The use of
JUnit to test the Ant extension is also illustrated. In addition,
an implementation is shown using the Spring framework. The Ant-IoC
combination opens up new possibilities for creating loosely coupled
software development support tasks.
Josef Betancourt,
February 2005
Some reader favorites:
EJB fundamentals and session beans
Create a scrollable virtual desktop in Swing
Web services test code generator
Klaus Berg has recently released a test-code generator for JUnit-based Web service clients. If you're developing Web services
using Axis2 and XMLBeans this wizard could turn your JUnit test client coding into a powerful code generation process. It
also has uses for those using GUI-based testing tools like soapUI.