HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

Object Design's ObjectStore PSE Pro for Java is a native Java-persistent object database (PSE stands for Persistent Storaget Engine). It allows running Java objects to save and restore state. The differences between the Pro' release and the general release involve the ability to simultaneously access databases and to recover databases.

ObjectStore PSE Pro is aimed mainly at the Java application programmer. Its object-oriented database provides an alternative option to JDBC, which is likely its main competitor.

ObjectStore PSE Pro will work with any Java Virtual Machine - it's 100% native Java. I evaluated it with the Microsoft SDK for Java 1.5 on a Windows 95 notebook.

Installing ObjectStore PSE Pro was simple: an InstallShield with no options and adding two zip files to my CLASSPATH. The documentation is all in HTML format and all on-line. The API is all documented with javadoc so it will be a familiar format for most users. The user's guide is fairly straightforward and easy to follow (unlike some HTML manuals that are forever linking you all over the place and have no coherent path through them).

To use PSE Pro, you must compile your source code normally and then run a post-processor on the resulting classes, which makes them persistence-capable. This step is a bit of a pain, but straightforward if you are using a command-line SDK. If you are using an IDE (e.g. Symantec Café, SuperCede, Microsoft Visual J++, etc.), this is somewhat more complicated and requires environment-specific workarounds to run the post-processor. The post-processor creates a new directory hierarchy, a mirror of the actual one, which contains the new class files. You must ensure that the Virtual Machine's CLASSPATH references the mirrored persistence-capable hierarchy in order to run properly.

There are some pitfalls to the post-processor scheme: all classes must be pre-processed, even if they are not to be persistence-capable, and all objects must be consistent with each other. If your build environment is time-dependency'-based, this should be easy to achieve since the make-utility will look after it all for you. If you, however, make things manually or using a script, you could be in for some trouble using this product.

Security limitations on applets really get in the way of this product. Object Design would like people to use ObjectStore PSE Pro as a Web-based database, but the Java security model prevents applets from reading/writing local files. Internet Explorer and Netscape 4.0 are able to work around this using signed applets. As far as I can tell, PSE is only currently useful for writing Java applications or for very targeted Web applications where the users will all be using Microsoft Internet Explorer or Netscape 4.0. I'm sure that within 6 months enough users will be using a new enough browser that this security limitation will be effectively removed and local database applications will be possible. Object Design has included an appendix detailing the steps required for making your Applet trusted (and thus work with Internet Explorer or Netscape 4.0).

There are eight samples included with PSE Pro. The simplest, pcount, demonstrates a simple Web page hit counter implemented as a persistent integer in Java. Using the simple size metric of number of semi-colons (borrowed from C), this file is 27 statements long, an indication of how simple using the PSE library is. The most complicated example, OSDraw, implements an applet with persistent storage for an image based on the object-shapes drawn upon a canvas. The simplicity of these examples shows the wisdom of the post-processor approach: There are no changes required to the source code for an object to become persistence-capable. Compare this with trying to rewrite all the objects themselves to understand persistence and you will see what I mean.

This product seems very well executed. It is obvious to me that Object Design has a competent technical staff working on it. Unfortunately, I think that the Java security model will limit the product's usefulness in the short term. I also believe that a standards-based approach (JDBC) might be a better way to go. However, Object Design has some powerful partners - Symantec will be bundling PSE with Café, as will Asymetrix with SuperCede and Borland with JBuilder. Microsoft and Netscape have both licensed PSE. Given that Netscape will be bundling PSE with Communicator, this could be an attractive technology to choose for storing preferences and information on the client machine since much of the code will already be there.

ObjectStore PSE Pro may be obtained directly from the company at their Web page. You may also download an evaluation copy from their Web site (http://www.odi.com).

About the Author
Don Bowman is a software designer with a startup company in Ontario, Canada. He has worked with Java on HP-UX and Windows 95 environments. Don can be reached at [email protected]


All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.