ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

ONJava.com Articles

251 to 300 of 810 Prev Next

Using CachedRowSet to Transfer JDBC Query Results Between Classes
By Sean Eidemiller
JDBC developers have always needed to keep a database connection open while pulling query results. But with the CachedRowSet in J2SE 1.5, it's now possible to disconnect and then get results. Sean Eidmiller shows the advantages of this approach. Jun. 23, 2004

Interruptible Database Queries
By Slav Boleslawski
Perceived performance isn't just about speed; it's also about responsiveness. And few things frustrate a user like an application that ignores user input because it's off doing something else. Slav Boleslawski introduces threading techniques to keep database queries and result retrieval from locking up an application. Jun. 16, 2004

Code Improvement Through Cyclomatic Complexity
By Andrew Glover
Overly complex code is dangerous, hard to maintain if not already buggy. But what do we mean by "complex"? The metric of cyclomatic complexity helps show where the most complex code is. As Andrew Glover illustrates, finding the complex code is also the first step to refactoring it. Jun. 16, 2004

Java Development on Eclipse, Part 2
By Steve Holzner
In this conclusion of a two-part series of excerpts from Eclipse, author Steve Holzner provides still more examples of how Eclipse makes it easier to create Java code from scratch. This week he covers creating Javadocs, refactoring, adding certain skills to your Eclipse toolbox, and customizing the development environment. Jun. 16, 2004

Improving JSF by Dumping JSP
By Hans Bergsten
JSF is a great technology for complex web application interfaces. But Hans Bergsten urges you not to give up on JSF just because the JSP layer is flawed; using a custom ViewHandler resolves all of the issues. Jun. 9, 2004

SMS-Powered Applications
By Dejan Bosanac
SMS (short message service) is ubiquitous in the small device space, and offers a means of sending and receiving messages from even the simplest mobile phone. Dejan Bosanac looks at how Java can be made to work with SMS. Jun. 9, 2004

Java Development on Eclipse, Part 1
By Steve Holzner
Steve Holzner contends that Eclipse makes it easier to create Java code from scratch. In this excerpt from Chapter 2 of his book, Eclipse, Steve shows how Eclipse makes it easy to create new methods, classes, and packages, as well as how to build and run the code. Jun. 9, 2004

Data Models for Desktop Apps
By Andrei Cioroianu
Andrei Cioroianu shows how to develop data models for Java desktop applications and how JavaBeans and the Model-View-Controller (MVC) pattern can make your code more maintainable and reusable. Jun. 2, 2004

Writing Ant Tasks
By Michael Fitzgerald
Among the many reasons the Java community loves Ant is its flexibility: adding new capabilities to Ant just requires writing a small amount of custom Java code. Michael Fitzgerald shows how Ant can be extended to provide handy XML validation. Jun. 2, 2004

Template-Based Code Generation with Apache Velocity, Part 2
By Giuseppe Naccarato
Giuseppe Naccarato's investigation of code generation continues with a look at using a language-agnostic model to represent the relationships of classes, attributes, and operations in the code to be generated. Does it work better than something platform-specific? The answer is surprising. Jun. 2, 2004

SSS (Small, Simple, Safe)
By Alper Coskun
Teaching Java is complicated both by the language's syntax and the huge number of classes in its standard libraries. According to Alper Coskun, one solution might be "Small Simple Safe" (SSS), which tries to alleviate this by giving the user an opportunity to create and relate objects in a very simple GUI. May. 26, 2004

Documenting Projects with Apache Forrest
By Kyle Downey
Apache Forrest helps you develop the documentation to accompany your application, automatically providing a number of neat features such as menus, links, cross-references, and breadcrumb navigation. Kyle Downey provides an introduction. May. 26, 2004

Nested Classes, Part 3
By Robert Simmons, Jr.
In this third and final installment on nested classes, excerpted from Hardcore Java, author Robert Simmons covers static nested classes, double nested classes, and nested classes in interfaces.  May. 26, 2004

Flexible User and Environment Ant Configuration
By Grant Bremer
Among the many feats it can perform, Ant can save your team from having to have all of the same files in all of the same places. As Grant Bremer illustrates, flexible Ant configurations will make your build work among many developers, operating systems, and will even deploy to app servers with different file structures. May. 19, 2004

Results from the 2004 ONJava Reader Survey
By Chris Adamson
The results of the 2004 ONJava Reader Survey are in, and they show a readership that uses a wide variety of tools and standards. They also show where ONJava is, and isn't, providing the content the readers want. May. 19, 2004

Nested Classes, Part 2

Robert Simmons continues his efforts to clarify confusion over the use of nested classes in Java. In this week's installment, excerpted from Chapter 6 ("Nested Classes") of Hardcore Java, Robert discusses the somewhat troublesome limited-scope inner classes; one specific type within this category, known as anonymous classes; and the problems programmers encounter with limited-scope classes.  May. 19, 2004

Performance Analysis of J2EE Applications Using AOP Techniques
By Ramchandar Krishnamurthy
It's tricky to profile a J2EE application to find performance bottlenecks; it's even trickier to do this with a production system, without introducing instability or new slowdowns. Aspect-Oriented Programming (AOP) offers a means of injecting new code, such as performance metrics, into existing code, without re-compiling. Ramchandar Krishnamurthy shows how this can be done. May. 12, 2004

Nested Classes, Part 1
By Robert Simmons, Jr.
One aspect of the Java language that is not widely understood is the concept of nested classes. But because you're bound to encounter one or more of them in other people's code, it's important to understand how they work. Chapter six of Hardcore Java covers the various nested classes. In this first excerpt in a three-part series of excerpts from the chapter, author Robert Simmons covers the first of the three basic categories of nested classes: inner classes.  May. 12, 2004

JSP 2.0: The New Deal, Part 4
By Hans Bergsten
The wait is almost over: the latest version of the JavaServer Pages (JSP) specification, JSP 2.0, is about to be released. Hans Bergsten shows how the new changes make using JSP and its expression language cleaner and more powerful. May. 12, 2004

Generating Code with Velocity
By Daniel H. Steinberg
Online version of the ONJava Newsletter for 6 May 2004. May. 6, 2004

SQL Database Access with DBTags
By Deepak Vohra
Jakarta DBTags is a custom tag library that consists of tags to access and modify a database. This tutorial explains the procedure to incorporate Apache Jakarta DBTags custom tag library tags in an example JSP. May. 5, 2004

The State of JAXB: Availability, Suitability, Analysis, and Architecture
By Satya Komatineni
JAXB, now part of Sun's Web Services Developer Pack, offers a means of converting between Java objects and an XML representation. But is it the ideal solution? Satya Komatineni investigates what JAXB has to offer. May. 5, 2004

Template-Based Code Generation with Apache Velocity, Part 1
By Giuseppe Naccarato
This article demonstrates a simple code generator in Java that uses Velocity. The generator takes an XML representation of classes and data members and generates the Java code to define them. The generation process will be driven by a template that encapsulates the syntax of the target programming language.  May. 5, 2004

Prototyping Desktop Applications
By Andrei Cioroianu
Does J2SE provide the functionality your application needs? A great way to find out is by developing a prototype, tackling the hard parts first to see if they can be made to work. Andrei Cioroianu employs Java2D and Swing in developing a prototype image-annotation application. Apr. 28, 2004

Seven Low-Cost Ways to Improve Legacy Code
By Robert Simmons, Jr.
Robert Simmons, Jr. presents seven techniques developed and used in his consulting work that are designed to improve legacy code, without a major investment in man hours or cash. Robert is the author of the recently released Hardcore JavaApr. 28, 2004

Do As They Need, Not As They Say
By Jeff Lowery
Replacing an existing system with a new and improved one should make end users happy, but that's often not the case. What goes wrong? Jeff Lowery calls on his experience to look at the process of developing new systems and why developers need to be advocates for the end users. Apr. 28, 2004

Back with more on JSP pages
By Daniel H. Steinberg
Online version of the ONJava Newsletter for 22 April 2004. Apr. 22, 2004

Declarative Programming in Java
By Narayanan Jayaratchagan
JSR-175 introduces Java annotations, a means of attaching metadata to your Java classes. Narayanan Jayaratchagan looks at how annotations work in J2SE 1.5 and the many ways in which they can be used. Apr. 21, 2004

Java and Security, Part 2
By Avinash Chugh, Jon Mountjoy
This second and final excerpt from Chapter 17 of WebLogic: The Definitive Guide covers WebLogic's various security providers and their default implementations, along with a look at how to authenticate using JAAS, and examples of Authentication and Identity Assertion Providers. Apr. 21, 2004

JSP 2.0: The New Deal, Part 3
By Hans Bergsten
In this third article on JSP 2.0, Hans Bergsten (author of JavaServer Pages, 3rd Edition) shows the improvements made in JSP 2.0 for writing JSP pages as XML documents. Apr. 21, 2004

Migrating to Velocity
By Jason R. Briggs
Velocity offers a compelling way to develop web applications, but converting an existing JSP-based project is no simple task. Jason Briggs shows how he used Velocity servlets to ease the transition. Apr. 14, 2004

Java and Security, Part 1
By Avinash Chugh, Jon Mountjoy
In part one in a two-part series of excerpts from Chapter 17 of WebLogic: The Definitive Guide, authors Avinash Chugh and Jon Mountjoy examine WebLogic's various security mechanisms, beginning with a look at the Java Security Manager and how WebLogic filters connection requests. They also cover WebLogic's authentication and authorization framework and how it supports the standard J2EE security services.  Apr. 14, 2004

Clustering and Load Balancing in Tomcat 5, Part 2
By Srini Penchikala
The latest version of Tomcat provides clustering and load-balancing capabilities for scalable, high-available systems. In part two of this series, Srini Penchikala sets up a Tomcat cluster and assesses its performance. Apr. 14, 2004

Introduction to JavaServer Faces
By Alexander Prohorenko
Swing developers enjoy a well-defined set of high-level components for building GUI applications, but what about web applications? JavaServer Faces attempts to bring the same kind of toolkit to the web-app space. Alexander Prohorenko offers an introduction to this new technology. Apr. 7, 2004

Wiring Your Web Application with Open Source Java
By Mark Eagle
Building a web application with Java can be a complex process when architecting a combination of UI, business logic, and persistence. This article introduces a way to leverage open source software to lessen the burden. Apr. 7, 2004

Java and Sound, Part 2
By David Flanagan
This second installment in a two-part series of excerpts from Java Examples in a Nutshell, 3rd Edition follows last week's (on playing streaming sounds in both sampled audio and MIDI formats) with examples of how to read a simple musical score and convert it into a MIDI sequence. Author David Flanagan also shows you how to make music by directly controlling a MidiChannel of a SynthesizerApr. 7, 2004

Java and Sound, Part 1
By David Flanagan
Where can you learn how to play simple audio clips with the java.applet.AudioClip class, as well as how to use the javax.sound.sampled and javax.sound.midi packages to do such things as load and play sound clips, and monitor and change the playback position within a clip? In these first excerpts in a two-part series of excerpts from Chapter 17 ("Sound") of Java Examples in a Nutshell, 3rd EditionMar. 31, 2004

Clustering and Load Balancing in Tomcat 5, Part 1
By Srini Penchikala
The latest version of Tomcat provides clustering and load balancing capabilities for scalable, highly available systems. In part one of this series, Srini Penchikala looks at architectural factors to consider in such a system and how Tomcat implements them. Mar. 31, 2004

Bug Prevention with Code Generation: A J2EE Case Study
By Francesco Aliverti-Piuri
If you had to drill 12,000 holes, would you prefer a manual drill, or its automated equivalent? Francesco Aliverti-Piuri describes using code generation for discovering bugs in a J2EE example. Mar. 31, 2004

Using a Request Filter to Limit the Load on Web Applications
By Ivelin Ivanov
When your site is slow, users keep clicking and making new requests, which only makes things worse. Kevin Chipalowsky and Ivelin Ivanov present a servlet filter that limits the stress a single user can put on your Java web application. Mar. 24, 2004

Lisp and Java
By Dan Milstein
First-class functions are a powerful feature of the Lisp programming langauge. This article describes some ways they can be used, and explores how to approximate them in Java. Mar. 24, 2004

J2EE Connector Architecture
By Anthony Lai, Jyotsna Laxminarayanan
This article looks at some of the challenges of legacy system integration, then introduces the J2EE Connector Architecture (J2EE CA) and explains how it can significantly reduce the problems of integrating your legacy system. It also offers a comprehensive example of how to use the current version of J2EE CA to access a common transaction-processing platform from a Java 2 Enterprise Edition (J2EE) platform application. Mar. 24, 2004

Lazy Loading with Aspects
By Russell Miles
AspectJ allows the Java community to apply modular crosscutting concerns, or aspects, to their applications. Lazy loading is one such crosscutting concern that can benefit from an Aspect-Oriented, rather than traditional Object-Oriented, implementation approach. This article presents an implementation of lazy loading using AspectJ. Mar. 17, 2004

ONJava Reader Survey
By Daniel H. Steinberg
This year's ONJava survey asks you which technologies you use, and where and how you use them. Help us shape the site and enter for your chance to receive three O'Reilly books of your choosing. Mar. 17, 2004

Extending Maven Through Plugins
By Eric Pugh
Maven is the build tool that does everything for you, from compiling code to setting up structures for process and documentation. But what if there's something more that you do and you want to integrate it into Maven? Eric Pugh shows you how to do this with Maven plugins. Mar. 17, 2004

BlackMamba: A Swing Case Study
By Ashwin Jayaprakash
It's one thing to learn the bits and pieces of a Swing GUI -- how to create a model and wire it up to a JTable or JTree. It's quite another to think through and develop a full-blown application. Ashwin Jayaprakash uses an email client, BlackMamba, to show how the pieces of a Swing application fit together. Mar. 10, 2004

Java APIs for Bioinformatics
By Stephen Montgomery
An introduction to Java APIs for bioinformatics. This article includes usage information, examples, and current design challenges for API developers in the life sciences field. Mar. 10, 2004

Another Java Servlet Filter Most Web Applications Should Have
By Jayson Falkner
Adding to his previous must-have servlet filters, Jayson Falkner introduces another: one to activate client-side caching, so browsers won't re-request items they can just cache. Mar. 3, 2004

MVC Heresy with SQLTags
By Steve A. Olson
When the "right" way is more than you need, is it wrong to do what works? Steve A. Olson introduces the SQLTags toolkit, which takes database access out of its traditional tier and puts it directly into JSP tags. Mar. 3, 2004

Cooking with Java Servlets & JSP, Part 2
By Bruce W. Perry
In this second and final batch of recipes excerpted from Java Servlet & JSP Cookbook, author Bruce Perry shows you how to access an EJB from a servlet on WebLogic, and how to connect to Amazon Web Services (AWS) with a servlet or JSP. Mar. 3, 2004