x
Loading
 Loading
Hello, Guest | Login | Register

Metadata for Java

Metadata is information that cannot be expressed in Java, but is nevertheless important for your Java application to work properly. Currently, metadata is expressed in separate text, Java properties, and XML files, but that poses a serious problem: code is disconnected from configuration, making development, deployment, and maintenance that much more difficult. JDK 1.5 addresses this disparity, capturing critical information where it belongs: right in your code.

Sun has always been extremely conservative with Java, introducing very few radical changes even between major releases. The Java Development Kit 1.5 (JDK 1.5, code-named “Tiger”) marks a radical shift from that policy. JDK 1.5 has several new features, including generics, boxing, and enhanced enumerators. [See the accompanying feature story, “Java 1.5,” on page 18 for more information.] JDK 1.5 also introduces metadata.

There are numerous ways to describe what metadata is, but a simple definition, at least in this context, is “information that cannot be expressed in Java, but is nevertheless important for your Java application to work properly.” For example, Java properties and XML files are two forms of metadata that you probably use every day.

But metadata — as it’s expressed now in separate text files — poses a serious problem: as applications grow and evolve, the dependence and potential for discontinuity between code and configuration grows, making development, deployment, and maintenance that much more difficult. Tiger’s embedded metadata feature aims to address this disparity, capturing critical information where it belongs: in the code.

For Java, the emergence of the J2EE specification has increased the importance of metadata to a point where it’s now a vital part of most of enterprise applications. A J2EE application is typically made of Java classes, resources, and a good deal of metadata specified in XML files. Indeed, metadata is used widely in Java to specify object-relational mappings (how Java fields are mapped…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace