Component Development for the Java™ Platform

Book description

Java™ is an object-oriented language, but it is also a component-oriented platform. Java's class-loading model and rich type information makes it possible to build flexible and reusable binary components. COMPONENT DEVELOPMENT FOR THE JAVA™ PLATFORM reveals both the potential and pitfalls of developing components using the Java platform.

As a platform, Java defines the services needed to connect binary components at runtime safely and reliably. To truly take advantage of all that Java has to offer, you must consider not just development but also deployment, and not just objects but also components. COMPONENT DEVELOPMENT FOR THE JAVA™ PLATFORM delves into the component-oriented features of the Java platform, thoroughly discussing class loading, reflection, serialization, native interoperation, and code generation.


  • Use and troubleshoot Class Loaders

  • Build dynamic and generic services through reflection

  • Control an object's serialized representation

  • Load and use native code components

  • Extend the Java class format to add custom services

  • Automate development with code generation

This is a cutting-edge approach to Java programming: An emphasis on deployment can be the best way to take advantage of some of the most valuable, yet less heralded, aspects of Java technology.


Table of contents

  1. Copyright
  2. Foreword
  3. Preface
  4. From Objects to Components
  5. The Class Loader Architecture
    1. Assembling an Application
    2. Goals of the Class Loader Architecture
    3. Explicit and Implicit Class Loading
    4. The Class Loader Rules
    5. Hot Deployment
    6. Unloading Classes
    7. Bootclasspath, Extensions Path, and Classpath
    8. Debugging Class Loading
    9. Inversion and the Context Class Loader
    10. Onward
    11. Resources
  6. Type Information and Reflection
    1. The Binary Class Format
    2. Reflection
    3. Reflective Invocation
    4. Dynamic Proxies
    5. Reflection Performance
    6. Package Reflection
    7. Custom Metadata
    8. Onward
    9. Resources
  7. Serialization
    1. Serialization and Metadata
    2. Serialization Basics
    3. Using readObject and writeObject
    4. Matching Streams with Classes
    5. Explicitly Managing Serializable Fields
    6. Abandoning Metadata
    7. Object Graphs
    8. Object Replacement
    9. Finding Class Code
    10. Onward
    11. Resources
  8. Customizing Class Loading
    1. Java 2 Security
    2. Custom Class Loaders
    3. Protocol Handlers
    4. Getting Past Security to the Loader You Need
    5. Reading Custom Metadata
    6. Onward
    7. Resources
  9. Interop 1: JNI
    1. Why Interoperate?
    2. The Dangers of Native Code
    3. Finding and Loading Native Code
    4. Calling Java from C++
    5. Error Handling in JNI
    6. Resource Management
    7. Onward
    8. Resources
  10. Generative Programming
    1. Why Generate Code?
    2. Why Generate Code with Java?
    3. A Taxonomy of Bind Times and Modes
    4. Code Generation in RMI
    5. Code Generation in JSP
    6. Code Generation in EJB
    7. Generating Strongly Typed Collections
    8. Generating Custom Serialization Code
    9. Onward
    10. Resources
  11. Onward
    1. Where We Are
    2. Where We Are Going
    3. Resources
  12. Interop 2: Bridging Java and Win32/COM
    1. Overview
    2. Translucent Stubs
    3. Platform Impedance
    4. The Component Object Model
    5. Win32 Dynamic Link Libraries
    6. Marshalling Architecture
    7. Generating Stubs
    8. Onward
  13. Bibliography

Product information

  • Title: Component Development for the Java™ Platform
  • Author(s): Stuart Dabbs Halloway
  • Release date: December 2001
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 0201753065