Java Security Landscape
FTP Online (Security Special), November 1, 2004

Architects, developers, and IT managers must take collective responsibility for creating secure solutions. This article explores Java's built-in security features and shows the reader how to exploit the rich language- and enterprise-level security features to build a secure environment.

Taming Tiger, Part 3: Decorate your code with Java annotations
JavaWorld, July 19, 2004

The Java 2 Platform, Standard Edition (J2SE) Version 5 (previously called J2SE 1.5; Sun has changed its version numbers) contains new and exciting features, many of which have been long awaited for by Java programmers. J2SE 5—code named "Tiger"—is the most significant revision to the Java language since its original inception. Tarak Modi's primary goal with his three-part series on Tiger is to familiarize readers with J2SE 5's most important additions and show how to capitalize on these additions in the real world. Part 3 focuses on annotations, Tiger's new metadata feature.

Plug Into J2EE-.NET Interoperability
FTP Online (J2EE Special Issue), June 2004

It's all about platform neutrality: Your J2EE and .NET apps must interact. This overview presents the standards and available technologies that can help you shape interoperable solutions.

6 Best Practices for J2EE Architecture
FTP Online (J2EE Special Issue), June 2004
(not available online)
What are some of the most crucial J2EE architectural issues? Learn six "in-the-trench" lessons for improving the design and implementation of your existing and future J2EE apps.

Taming Tiger, Part 2: Understanding generics
JavaWorld, June 7, 2004

The Java 2 Platform, Standard Edition (J2SE) 1.5 contains new and exciting features, many of which have been long awaited for by Java programmers. J2SE 1.5—code named "Tiger"—is the most significant revision to the Java language since its original inception. Tarak Modi's primary goal with his three-part series on Tiger is to familiarize readers with J2SE 1.5's most important additions and show how to capitalize on these additions in the real world. In Part 2, he introduces generics.

Taming Tiger, Part 1: An Introduction to Java 1.5
JavaWorld, April 26, 2004

The Java 2 Platform, Standard Edition (J2SE) 1.5 contains new and exciting features, many of which have been long awaited for by Java programmers. J2SE 1.5 - code named "Tiger" - is the most significant revision to the Java language since its original inception. Tarak Modi's primary goal with his three-part series on Tiger is to familiarize readers with J2SE 1.5's most important additions and show how to capitalize on these additions in the real world.

J2SE 1.4 breathes new life into the CORBA community, Part 4
JavaWorld, November 29, 2002

In the conclusion to this four-part series on enterprise CORBA development with J2SE (Java 2 Platform, Standard Edition) 1.4, Tarak Modi discusses two important topics: portable interceptors and the Interoperable Naming Service (INS). Those interested in extending ORB functionality, whether to provide additional logging and debugging information, or pass additional call context information during runtime, will find portable interceptors useful; they provide a standard and portable way of extending the ORB. All CORBA developers will find the section on the INS refreshing because it provides a layer on top of the CORBA Naming Service that features support for stringified and user friendly URL names and standardized bootstrapping.

J2SE 1.4 breathes new life into the CORBA community, Part 3
JavaWorld, October 25, 2002

In Part 2 of this series on enterprise CORBA development, Tarak Modi described the Portable Object Adapter (POA), which was introduced in CORBA 2.2 as a replacement for the Basic Object Adapter (BOA). The POA allows for a level of code (and skill) portability not possible with the BOA. In this hands-on article, Tarak shows you how to use the POA to create enterprise-level applications.

J2SE 1.4 breathes new life into the CORBA community, Part 2
JavaWorld, September 27, 2002

The Portable Object Adapter (POA), introduced in CORBA 2.2, replaced CORBA's Basic Object Adapter (BOA). An object adapter represents a core piece of the CORBA runtime on the server. Because the BOA was weakly defined, vendors introduced their own value-added services to their BOA implementations, thus creating incompatibilities. POA resolves that issue. In Part 2 of this series on enterprise CORBA development, Tarak Modi begins exploring J2SE (Java 2 Platform, Standard Edition) 1.4's POA support.

What's New in EJB 2.1?
JavaPro, October 2002
(not available online)
Since the release of EJB 2.0, Web services have gained tremendous momentum. So it should come as no surprise that the draft specification of EJB 2.1 includes Web services support as one of its major enhancements. Learn more about this new functionality, and find out what else is new.

J2SE 1.4 breathes new life into the CORBA community, Part 1
JavaWorld, August 30, 2002

CORBA complements the Java platform by providing a distributed-object framework, services to support that framework, and interoperability with other languages. The Java platform complements CORBA by providing Write Once, Run Anywhere portability, a highly productive implementation environment, and a robust platform. By combining Java with CORBA and other key enterprise technologies, the Java 2 Platform offers the ultimate platform for distributed technology solutions. In this four-part series on enterprise CORBA development, Tarak Modi explores the new CORBA features in J2SE (Java 2 Platform, Standard Edition) 1.4, and discusses how you can use them to create highly scalable and robust applications. Part 1 will touch upon these features and end with a brief tutorial on creating a simple CORBA-based application using J2SE 1.4.

Merlin Demystifies Java Debugging
JavaPro, March 2002
(not available online)
The Java 2 Platform, Standard Edition (J2SE) version 1.4, which Sun calls "Merlin" and which is in beta 3 at the time of this writing, goes a long way in formalizing an issue that has vexed Java developers since the first release of Java—and that all prior releases of Java have dodged. That issue is standardized program debugging. I don't mean the development of Java debuggers, but the simple, yet powerful facilities of logging messages (errors and warnings) and using assertions. These facilities are powerful because conventional debuggers cannot be used in some situations—for example, when the application is already deployed at the client or when the problem happens only intermittently or when the only way the problem can be created is in real time with many simultaneous interactions. Merlin includes both assertion and message-logging facilities. Let's see what these functionalities will mean for developers.

Plug 'n' Play Enterprise Apps
JavaPro, February 2002
(not available online)
For companies that operate with multiple enterprise information systems (EISes), integrating these systems is critical to achieve the highest level of operational efficiency. Because J2EE support for enterprise application integration has been minimal (essentially, JMS and XML support it with the JAX APIs), Sun and its Java Community Process partners have proposed the J2EE Connector Architecture (JCA) standard as part of version 1.3 of the J2EE specification. The JCA provides a standard Java solution to the problem of connectivity between the many application servers and EISes already in existence.

JMX Makes App Management Simple
JavaPro, Guide for Application Servers 200
1 (not available online)
How often do you hear of a production-quality application that does not need to be managed or configured at all? Not often is my guess. This is probably because applications today consist of not a single program, but a sophisticated network of programs interacting with one another in complex ways. Not surprisingly, you usually need to tune many parameters and settings to control these complex interactions.

Jazz Up Java Security with JAAS
JavaPro, September 2001
(not available online)
A powerful combination of class loaders, security managers, and access controllers helps developers create secure applications, but Java is weaker in the areas of user authentication and authorization. Find out how the Java Authentication and Authorization Service (JAAS) enhances the Java security model.

Applying the Facade Pattern to JMS using a Custom Protocol Handler
Java Developer's Journal, May 2001

JMS serves as an excellent foundation for enterprise applications. Although the JMS API is very concise, using JMS effectively can be challenging and there are many potential booby traps that novice users may fall prey to. Furthermore, it may not be very appealing to force every developer in your organization to learn JMS. Most organizations would avoid the above "issues" by creating a reusable library (i.e., a facade) that encapsulates all the JMS-related code/knowledge. Unfortunately, even this library would require a learning curve, albeit a smaller one (hopefully). In this article I present an alternative approach based on the Java protocol handler architecture. The major advantage of this approach is that most Java developers are already familiar with using this architecture via the URL class in the package. For example...

Asynchronous RMI
JavaReport, March 2001
(not available online)
In this article I discuss an architectural framework that supports asynchronous RMI. The framework will leverage the power of the newly introduced dynamic proxy classes in version 1.3 of the Java 2 platform. Refer to my two part series "Understanding the Dynamic Proxy Classes in Java 1.3" in JavaReport for details about these classes.

Dynamic Logging & the CORBA Notification Service
Dr. Dobbs Journal, March 2001

If there is one woe that programmers share, it's discovering that an application does not work as expected. Debuggers are the usual tool of choice, but they aren't always available. For that matter, it may be difficult to find a good debugger for real-time and/or distributed applications, not to mention the app may have already been deployed at the customer's site and already in operation. Take a look at this article for a very flexible alternative using the CORBA Notification Service.

Add the power of asynchronous processing to your JSPs
JavaWorld, February 2001

Applications based on message-oriented middleware (MOM), such as Java Messaging Service (JMS), tend to be more scalable than those based on remote procedure call (RPC) middleware, such as RMI. But that added scalability does not come for free. Because it forces the developer to think in a discontinuous and unnatural mode, asynchronous programming is inherently more complex than synchronous programming. In this article, I show how to bring the power of JMS to JavaServer Pages developers who are excellent at content development but not interested in the intricacies of asynchronous programming.

Understanding the Dynamic Proxy Classes in Java 1.3 (Part II): A Hooks Architecture
JavaReport, February 2001
(not available online)

Understanding the Dynamic Proxy Classes in Java 1.3 (Part I)
JavaReport, January 2001
(not available online)
Version 1.3 of the Java 2 Platform added a new API for dynamic proxy classes. These classes have been introduced as part of the Java Reflection API — i.e., they have been added to the java.lang.reflect package. A dynamic proxy class is a class that implements a list of interfaces specified at runtime. This proxy can then be used as if it actually implemented these interfaces — i.e., any method on any of these interfaces can be called directly on the proxy (after type casting it, of course). Thus, a dynamic proxy class can be used to create a type-safe proxy object for a list of inter-faces without requiring pre-generation of the proxy class, such as with compile time tools.

Improve Java Performance
JavaPro, January 2001
(not available online)
Java's ability to let programmers develop complex applications relatively easily has no doubt contributed to its widespread popularity. However, this ease of use is a double-edged sword: Java critics often complain that "Java won't perform." A well-written program in Java may not perform as well as the same well-written program in C++, but most performance problems in Java programs are due not to Java, but to the program itself. Good design principles can go a long way in improving performance. For example, adding a thread pool to a Java application can not only improve performance, but make the application more robust and platform independent as well (see "Why Thread Pools are Important in Java," Java Pro, October 2000). However, good coding practices—including better use of the java.lang.String and java.util.Vector classes—must also be mastered, and can significantly bump up performance as well. In other words, a well-designed program will not, and cannot, compensate for poor programming practices. Let's see how these ideas work.

The RMI Activation Framework
JavaPro, November 2000
(not available online)
One problem with using the Java 1.1 RMI architecture is that you have to keep your RMI server running constantly. In this article, I introduce a class that not only lets you create RMI objects on demand, but allows the objects to deactivate themselves to conserve system resources.

Using Space-Based Programming for Loosely Coupled Distributed Systems
Java Developer's Journal, October 2000

One of the problems of highly distributed systems is figuring out how systems discover each other. After all, the whole point of having systems distributed is to allow flexible and perhaps even dynamic configura-tions to maximize system performance and availability. How do these dis-tributed components of one system or multiple systems discover each other? And once they’re discovered how do we allow enough flexibility, such as rediscovery, to allow their fail-safe operation? Space-based programming may provide us with a good answer to these questions and more. In this article I’ll describe what a space is and how it can be used to mitigate some of the issues mentioned above. And I’ve included a technique to convert an ordinary message queue into a space.

Why Thread Pools are Important in Java
JavaPro, October 2000
(not available online)
Multithreading is a powerful programming concept, but with the additional power comes additional responsibility and complexity. Java is a unique language in the sense that it has threading support built into it. This support is so ingrained within the language that it is almost impossible to create the simplest useful program without inadvertently using threads. However, this feature has led many programmers to create inefficient programs. The culprit here is not the naïveté of the programmers, but the false feeling of "Java will [efficiently] handle everything" that the language provides its followers. Not a silver bullet, thread pools still can be extremely effective in creating better performing multithreaded Java applications—although better performance is only a part of the reason to use thread pools, as you'll see...

Lock on to an alternate synchronization mechanism
JavaWorld, July 2000

Software professionals have been debating multithreaded programming for quite some time now. The notion of threading is so ingrained within the Java platform that developers can rarely create even simple programs without inadvertently using threads. Although the built-in threading support within the Java platform has allowed developers to create powerful programs, it has also left its share of scarred developers. The most common hazards lie in event-handling and the access of AWT/JFC Swing components. Rudimentary as it is, Java's built-in thread support is powerful enough to help build the most complex synchronization mechanisms required for commercial applications. The aim of this article is to illustrate that power by creating a reader/writer lock. The reader/writer lock implementation discussed here includes lock upgrade and downgrade capabilities. I'll also examine enhancements such as lock-leasing, various performance improvement tips, and ways of dealing with issues such as priority inversion.