![]() |
|||||||||||
| W O R K S H O P | |||||||||||
How Do You Take Your Java? August 9, 1999 IBM WebSphere IBM has bundled services for deployment and connection management around the Apache Web Server into its WebSphere Application Server (WAS). In addition to providing a Web server, the WAS runtime environment can operate as a plug-in to Microsoft's Internet Information Server (IIS) and Netscape Navigator/Communicator, acting as a broker for servlet traffic to and from the servlet manager.
Each servlet is associated with a servlet configuration, usually managed by the Application Server Manager. IBM has included an interesting class that maintains this information in an XML document, with the name, description, initialization parameters and a page list of your servlet. IBM provides PageListServlet and XMLServerConfig classes to make it easier to create and read the XML document. WebSphere has screens that simplify site administration and deployment tasks, letting you monitor servlet execution, connections, resource usage and response time.
GemStone/J GemStone provides several services over and above the servlet engine. GemStone/J optionally supports Java object persistence, which effectively eliminates the need for an application developer to code methods for storing, retrieving and creating objects via object-to-relational or object serialization. GemStone implements this by extending the JVM to include a persistent cache architecture. In addition to storing objects between invocation, the architecture provides a method to give state and application logic to a number of applications running on multiple Java virtual machines. Servlets and/or JavaBeans can be spread across a number of virtual machines or extended to other servers to achieve greater performance and high availability. "Scalability and Redundancy Options for Multiple Virtual Machines" (page 89) illustrates the GemStone shared virtual machine architecture. Servlets and beans are often called upon to marshal resources from multiple, disparate sources (legacy systems, real-time feeds and content from other sites) and manage the creation and updates of elements within them. To simplify this task, GemStone/J encapsulates session work into transactions. The Object Transaction Monitor (OTM) supports the expected services of begin, commit, rollback and locking. GemStone administrators can configure the level of transaction control that the servlet requires from the cache without additional coding. Java developers can manage nonrelational transaction integrity by responding to events raised by the GemStone environment.
Oracle 8i To deploy Java methods, a programmer develops the class using a favorite IDE. Two additional steps are then required. The database needs to be told which of the methods in the class is to be called from the SQL environment. The programmer then writes an Oracle PL/SQL call spec that identifies which Java methods are to be called from SQL. Next, the programmer maps the parameter and returns types to their SQL counterparts. Analogous to the utilities that load data into tables, the loadjava utility is used to upload the class into the schema. Then PL/SQL programmers can call them from any language construct, including as functions from select, update and insert statements. (See "Loading Java Into the RDBMS," at left, for an illustration of how Java components are loaded in the database.) Within a Java class, standard JDBC calls are used to access a relational database. This is significant for two reasons; it's portable and it's fast. JDBC is the standard way to access relational data from Java. Normally, JDBC is used remotely between processes. Oracle has implemented JDBC as part of the JVM within the Oracle RDBMS. However, access is much faster than remote access because of the structure of the JDBC implementation. The JDBC within the RDBMS accesses the underlying internal libraries and memory directly, so it doesn't suffer from the overhead of network access, interprocess communications or process context switches, all of which take time. All Java classes provided by Oracle are compiled to native code for faster execution. Additionally, a future version of the database will include an accelerator to translate user-written code to intermediate C code, which, in turn, is compiled to native code. Send your comments on this article to Brian Walsh at bwalsh@nwc.com.
| |||||||||||
|
PAGE: 1 I 2 I FIRST PAGE |
|||||||||||












