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

advertisement

AddThis Social Bookmark Button

ONJava.com Articles

151 to 200 of 810 Prev Next

Internationalization, Part 2

Having your Java apps run correctly both down the street and across the globe presents some hefty challenges. Part one of this two-part excerpt from Java Examples in a Nutshell, 3rd Edition covered the first two steps to internationalization in Java: using Unicode character encoding and handling local customs. This week deals with the third step in the process: localizing user-visible messages. Feb. 23, 2005

JDMK and Legacy IT Management
By Stephen B. Morris
Keeping a network with legacy (and possibly unreliable) devices is nearly impossible without some automated help. Stephen Morris shows how to use the Java Dynamic Management Kit to keep tabs on your network and find potential points of failure. Feb. 16, 2005

Internationalization, Part 1
By David Flanagan
Writing software that is truly multilingual is not an easy task. In this excerpt from Chapter 8 of Java Examples in a Nutshell, 3rd Edition, author David Flanagan offers programming examples for the three steps to internationalization in Java: using Unicode character encoding, handling local customs, and localizing user-visible messages.  Feb. 16, 2005

Designing a Fully Scalable Application
By Amir Shevat
It's difficult, maybe impossible, to know up front how much or in what ways your application will need to scale. But by decoupling parts of the application, you can at least ensure that the scaling process can be kept modular. Amir Shevat shows how some sharable pieces of the MantaRay messaging system can allow your app to grow beyond one box. Feb. 16, 2005

Eclipse Plugins Exposed, Part 1: A First Glimpse
By Emmanuel Proulx
Many developers use Eclipse out of the box as an IDE, never investigating its powerful extensibility. But as Emmanuel Proulx shows in this first installment of a new series, Eclipse's modular system of plugins allow you to customize it to your suit your development needs. Feb. 9, 2005

WS-Security in the Enterprise, Part 1: Problem Introduction
By Denis Piliptchouk
WS-Security doesn't exist in a vacuum--in an enterprise, it must work with many other systems, which means dealing with other access control systems and potential incompatibilities. Denis Pilupchuk begins his series on integrating WS-Security and enterprise systems by spelling out where the problem lies and what pieces need to be created to resolve it. Feb. 9, 2005

Creating Varargs in Java 1.5 Tiger
By Brett McLaughlin
This excerpt from Java 1.5 Tiger: A Developer's Notebook, by bestselling Java authors Brett McLaughlin and David Flanagan, shows you how to create and iterate over Java 1.5 varargs (variable-length argument lists). Learning to use varargs will have you writing better, cleaner, more flexible code in no time. Feb. 9, 2005

Bitwise Optimization in Java: Bitfields, Bitboards, and Beyond
By Glen Pepicelli
Flipping bits on and off is the lowest level of computing, and most Java developers are totally isolated from it. But maybe they shouldn't be. In this article, Glen Pepicelli introduces the idea of bitsets--ints and longs whose bitwise representation are the data you're interested in--and how they can be used with mathematical and logical operators to write faster code. Feb. 2, 2005

Object-Relational Mapping with SQLMaps
By Sunil Patil
Hibernate is great--if your DBA will let you run generated database queries on his or her system. Sometimes you need to keep the option of hand-optimized queries open. Sunil Patil introduces SQLMaps, a framework that allows you to do just that. Feb. 2, 2005

IRC Text to Speech with Java
By Paul Mutton
Paul Mutton creates a multi-platform IRC bot that uses the FreeTTS Java speech synthesizer library to convert IRC messages into audible speech. Why would you want to use an IRC text-to-speech system? By reading out messages as they arrive, you can keep working, diverting your attention to IRC only when necessary. Paul is the author of IRC HacksFeb. 2, 2005

An Introduction to Service-Oriented Architecture from a Java Developer Perspective
By Debu Panda
Service-oriented architectures offer a new way to think about building software applications, with coarse-grained pieces of functionality split out into "services" that communicate with standardized, widely understood interfaces like XML and SOAP. In this article, Debu Panda shows you how to design and connect SOAs. Jan. 26, 2005

Internals of Java Class Loading
By Binildas Christudas
When are two classes not the same? When they're loaded by different class loaders. This is just one of many curious side effects of Java's class-loading system. Binildas Christudas shows how different class loaders relate to one another and how (and why) to build your own custom class loader. Jan. 26, 2005

QuickTime for Java Components
By Chris Adamson
In this excerpt from QuickTime for Java: A Developer's Notebook, Chris Adamson introduces QuickTime components and how they enable runtime discovery of available features, including importers and exporters for graphics and movie formats. Jan. 26, 2005

Validating Objects Through Metadata
By Jacob Hookom
Metadata, in the form of J2SE 5.0's annotation, allow you to mark up your your code with declarative information, and then use reflection to pull out those annotations at runtime and use them. Jacob Hookom shows how these techniques can be used to validate input to your application. Jan. 19, 2005

Software Infrastructure Bottlenecks in J2EE
By Deepak Goel
Sometimes you can throw more CPUs and memory in a box and your web application doesn't get any faster. This can happen when the bottleneck is not in the hardware but the software; specifically, your application server. Deepak Goel looks at what this looks like in terms of performance characteristics and what you can do about it. Jan. 19, 2005

Parsing an XML Document with XPath
By Deepak Vohra
Pulling just a single node value or attribute from an XML document can be inefficient if you have to parse over a whole list of nodes you don't want, just to get to one you do. XPath can be much more efficient, by letting you specify the path to the desired node up front. J2SE adds XPath support, and the JDOM API also offers support through an XPath class. Deepak Vohra looks at both approaches. Jan. 12, 2005

Mock Objects in Unit Tests
By Lu Jian
Unit testing your code against a service or process that's either too expensive (commercial databases) or just not done yet is something you can deal with by simulating the other piece with a mock object. EasyMock can suffice in some cases, but it can only create mock objects for interfaces. Mocquer, based on the Dunamis project, can create mocks for classes, too. Lu Jian shows how it works. Jan. 12, 2005

Streaming QuickTime with Java
By Chris Adamson
Realtime multicast streaming came to QuickTime in version 5, but now, years later, it's not widely realized that it can be called from QuickTime for Java. Chris Adamson, author of QuickTime for Java: A Developer's Notebook, shows how it works. Jan. 12, 2005

Results from the Second 2004 ONJava Reader Survey
By Chris Adamson
Editor Chris Adamson summarizes the results of the recent reader survey, including favorite tools, platforms, and what you want to see on the site in 2005. Jan. 5, 2005

Working with Hibernate in Eclipse
By James Elliott
Jim Elliott was curious about whether anyone had written plugins to work with Hibernate in Eclipse, as he'd just finished writing Hibernate: A Developer's Notebook. It turns out there are several such efforts underway. In this article, Jim explores Hibernate Synchronizer--a plugin that automatically updates your Java code when you change your mapping document. Jan. 5, 2005

Caching Dynamic Content with JSP 2.0
By Andrei Cioroianu
Server-side caching is a powerful and popular technique for improving the performance of server-side applications. After all, why compute twice what you can compute once and hang on to? Andrei Cioroianu shows you how to exploit this technique in JSP 2.0. Jan. 5, 2005

Jini: Out of the Bottle and Into the Box
By Daniel H. Steinberg
What if a Jini lookup service was available in every shipping JVM? Not just for enterprise applications - where Jini is a natural fit - but also in every J2SE and J2ME distribution. Jini is Java's secret weapon. Dec. 29, 2004

ONJava 2004 in Review: Editor's Choice
By Chris Adamson
Editor Chris Adamson takes a look back at some of the most interesting articles published on ONJava during the last year. Dec. 29, 2004

The Hidden Gems of Jakarta Commons, Part 1
By Timothy M. O'Brien
The Jakarta Commons has a wide-ranging collection of handy classes that can save you the trouble of reinventing the wheel yet again. In this new series, Tim O'Brien looks at some of the more overlooked parts of the Commons and what you can do with them. Dec. 22, 2004

ONJava 2004 in Review: Popular Articles
By Chris Adamson
Editor Chris Adamson takes a look back at some of the most popular articles published on ONJava during the last year. Dec. 22, 2004

Towards Bug-Free Code
By Ashwin Jayaprakash
Test-driven development sometimes sounds better than it turns out to be. Early decisions to tightly couple functional parts of your system can make it a lot less amenable to testing than it ought to be. As Ashwin Jayaprakash shows, J2SE 5.0's generics make working with abstract classes and interfaces easier than it used to be, which encourages loose coupling and facilitates testing. Dec. 22, 2004

Generating an XML Document with JAXB
By Deepak Vohra
Among the positive aspects of XML Schemas is their support by the Java Architecture for XML Binding (JAXB). In this article, Deepak Vohra shows how JAXB can help convert a schema-supported XML file to a regular Java object and back again. Dec. 15, 2004

Session Replication in Tomcat 5 Clusters, Part 2
By Srini Penchikala
In part two of his survey of session replication, Srini Penchikala gets down to raw numbers by comparing the effects of different sizes and styles of replication on cluster performance. Dec. 15, 2004

A Distributed Discussion with Elliotte Rusty Harold
By Chris Adamson
In this interview, Java Network Programming, 3rd Edition author Elliotte Rusty Harold discusses the improvements and hazards of networking in Java, as well as the evolution of Java itself. Dec. 15, 2004

URLs and URIs, Proxies and Passwords
By Elliotte Rusty Harold
Java networking is seldom as simple as it first seems. In this excerpt, one of a series from Java Network Programming, 3rd Edition, Elliotte Rusty Harold shows how to encode and decode URLs, work with URIs, use multiple proxy servers, query servers with HTTP GET, and use password-based authentication. Dec. 8, 2004

Distributed Enterprise Messaging with MantaRay
By Amir Shevat
Java Messaging Service (JMS) is a much-used system for distributed enterprise applications, but many implementations use a "broker" approach that creates bottlenecks. MantaRay implements the JMS API through a peer-to-peer approach that, as Amir Shevat reports, provides some significant advantages. Dec. 8, 2004

Simple Object Persistence with the db4o Object Database
By Jim Paterson
Mapping Java objects to relational databases is a difficult task, fraught with perils and gotchas. db4o dodges the issue entirely by providing an object-oriented persistence mechanism that is small, lightweight and efficient. Jim Paterson shows how it works. Dec. 1, 2004

Creating Toolbars Using SWT
By Tim Hatton
The final element that end users expect to see in a well-designed window is the toolbar. In this PDF excerpt from SWT: A Developer's Notebook, Tim Hatton succinctly explains each step and guides you through the development of the toolbar. Dec. 1, 2004

Integrating Macromedia Flex with Java
By Mark Eagle
Web applications don't have to be about HTML. Rich client-side environments offer a better end-user experience but demand some rethinking of the web app client-server relationship. Mark Eagle shows how you can use Macromedia Flex to bring rich applications to Flash-equipped browsers. Dec. 1, 2004

Compiling an AspectJ Project Using Eclipse
By Russell Miles
You may be ready for aspect-oriented programming, but are your tools? In this PDF excerpt from AspectJ Cookbook, Russell Miles shows you how to install and use an AspectJ-aware plugin for the Eclipse IDE. Nov. 24, 2004

Session Replication in Tomcat 5 Clusters, Part 1
By Srini Penchikala
A web application running on a single server is completely lost if the server goes down. But with a cluster, user sessions can be replicated across servers, so that the system stays up even if one server fails. Srini Penchikala presents Tomcat 5's handling of this feature. Nov. 24, 2004

Juggle Your Java with JDistro
By Howard Wen
Typically, one Java application will live in its own virtual machine, but this is neither required nor necessarily desirable. JDistro, a multitasking Java application, makes it possible to run applications, applets, and more, all inside of one process. Howard Wen interviewed creators Guillaume Desnoix and Gérard Collin to find out how it works. Nov. 24, 2004

Writing Your ONJava Wish List
By Chris Adamson
It's time again for the ONJava reader survey. This article links to the survey and discusses how its results are used to shape the editorial content of the site. Nov. 17, 2004

Agile User Interface Development
By Paul Hamill
Agile is a sea of change, refocusing software developers on quality and speed. Its impact on the practice of software development is already being compared to that of object-oriented design. However, one area of effort has been slow to change: development of the graphical user interface (GUI). The critical question: how do you do test-first GUI development? Paul Hamill, author of Unit Test Frameworks, discusses separating GUI elements into smart objects and thin view components and doing TDD of the smart objects. Nov. 17, 2004

Dynamic Delegation and Its Applications
By Lu Jian
Proxy, introduced in Java 1.3, offers an interesting way to provide an interface's implementation at runtime, but there's more that can be done. Lu Jian shows how bytecode manipulation can be used to provide dynamic delegation, allowing you to provide runtime implementations of interfaces, abstract classes, and even concrete classes. Nov. 17, 2004

Extending Struts
By Sunil Patil
With so many web application frameworks available, there's little point reinventing the wheel, especially when Struts offers remarkable extensibility. Sunil Patil introduces the three basic means of extending Struts to achieve custom web application behavior. Nov. 10, 2004

Memory Contention in J2EE Applications for Multiprocessor Platforms
By Ramchandar Krishnamurthy, Deepak Goel
You can scale an enterprise app on a single box by adding CPUs, right? Yes--to a point. As Deepak Goel and Ramchandar Krishnamurthy have discovered and documented, the battle for access to memory from threads on the different CPUs creates a memory contention that, in time, becomes a bottleneck. In this article, they document the phenomenon and suggest some ways to improve the situation. Nov. 10, 2004

Got Project Automation?
By Mike Clark
Each project chore you automate is an investment that pays off immediately and increases in value over time. Mike Clark, author of Pragmatic Project Automation, presents an overview of the benefits that automating your project can bring. Nov. 10, 2004

Local and Remote EJB Interfaces
By Olexiy Prokhorenko
EJB 2.0's local interfaces can make your enterprise applications much faster, as they share data in memory instead of via an RMI link. But when can you use local interfaces, and when are you forced to go remote? Olexiy Prohorenko introduces the strategies for making the local/remote decision. Nov. 3, 2004

Using SSL with Non-Blocking IO
By Nuno Santos
Java 1.4 introduced non-blocking IO in the NIO package, but not a means of running SSL over it. That forced developers to choose between security and scalability. In J2SE 5.0, there is now a transport-agnostic SSL API, but it takes some work to understand. Nuno Santos shows how to put the two together. Nov. 3, 2004

Silent Life
By Chris Adamson
Online version of the ONJava newsletter for 28 October 2004. Oct. 28, 2004

The Singleton as a Network Management Pattern
By Stephen B. Morris
Patterns aren't for the local memory space any more. As Stephen B. Morris points out, patterns are also useful for network management problems. In this installment, he shows how the Singleton pattern can be used to manage access to functionality in a networked system. Oct. 27, 2004

How to Use JMS with PHP
By Amir Shevat
Java Messaging Service (JMS) is a great enterprise messaging architecture, but what if you have have a web application written in a non-Java language that wants to participate in JMS? Amir Shevat shows how PHP can be made to work with JMS. Oct. 27, 2004

Advanced Synchronization in Java Threads, Part 2
By Scott Oaks
J2SE 5.0 introduces new utilities for coordinating multiple threads. But where you have synchronized threads, you have a risk of deadlock. In this excerpt from Java Threads, 3rd Edition, Scott Oaks and Henry Wong look at deadlock and how to deal with it. Oct. 27, 2004

Advanced Annotations and Aspects
By Chris Adamson
Online version of the ONJava newsletter for 21 October 2004. Oct. 21, 2004