Demonstrates how to take full advantage of Java's power on
servers by using current technologies such as Java Servlets, Java Web
server, and JNDI. In September1999, Sun Microsystems Inc. released the first draft of the Java2 Enterprise Edition specification, and Java changed forever.
Since 1997, developers and vendors have increasingly pushed Java toward the server side of
the client/server architecture map. Where its original focus was in applets and web pages, Java is
now more at home on the web server or database server. Chances are, if you’re a professional Java
programmer, and your work environment is doing anything with Java, you’re in a position to consider,
if not write, Java-on-the-server.
By this point, the ubiquitous story about James Gosling and an oak tree, cable set-top boxes,
and the HotJava web browser are pretty much standard fare for Java programmers. For our purposes,
Java’s life on the server is what’s important, not what came before that.
Java’s emphasis toward the server began in 1997 with the release of the 1.1 version of the Java
Developer’s Kit (hereafter referred to as the JDK). In JDK 1.1, Sun introduced us to JDBC, JNI,
and RMI. Many vendors, such as NetDynamics, had already begun pushing Java on the server
side, using home-grown proprietary connections to RDBMSs, and so forth, but the 1.1 release
finally solidified access to these critical server-side resources. RMI gave us the ability to look to
other JVMs, JDBC let us peek inside the RDBMS, and JNI gave us the ability to call into native
code for anything that wasn’t covered in the first two.
A few other technologies, of lesser hype but equal importance, also made their debut in 1.1.
(It must’ve been a busy couple of months at Sun!) The Object Serialization specification was
released as part of 1.1, but was buried along with Reflection in the JavaBeans specification and API.
Granted, Serialization was also a key part of RMI, but most Java enthusiasts saw Serialization as a
part of the JavaBeans specification, and not much more. Java archives, or JAR files, also came along
with the 1.1 release. Unfortunately, 1.1 JARs were nothing more than a convenience for shipping
plural files around—no compression support was available until the Java 2/JDK 1.2 release.
Some linguistic changes came with 1.1, as well. Inner classes, anonymous classes, and a definition
for the reserved word “transient” finally came into being, partly in response to the change
in the AWT event-handling mechanism. Adapter classes (whose only role is to provide an accessibility
layer from one interface to another) became trivial to code using anonymous nested classes,
where before, it was monotonous and error-prone.
9781884777714 (1884777716)
0 Comments:
Post a Comment