⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 Java的面向对象数据库系统的源代码
💻
字号:
Handle Sample-------------This sample demonstrates the use of handles in Ozone to access persistentobjects. It also demonstrates one way to use Ozone in the context of aJSP/Servlet web application, where handles can be quite useful. This webapplication was developed and tested using Tomcat 4 from the Apachefoundation. Other JSP/Servlet contexts ought to work just as well.The example consists of a simple database of Songs.  There are two typesof persistent objects in the example:  song.Song and song.SongCollection.A single song.SongCollection is created in Ozone as a named object (its name is_AllSongs). The song.SongCollection contains a Java2 collection that indexessongs by their title (irrespective of case). Each song that is added tothe collection is also a persistent Ozone object.  However, the song.Songobjects are created anonymously -- they do not have names that Ozone isaware of.There are two ways to access any song in the database:  by title, whichrelies on the Java collection's index, or by handle, which bypasses thesong.SongCollection to go directly to Ozone to retrieve the song.Song.Building It-----------There are two useful build targets available.1) The default target builds handle.jar which includes a command line applicationdemonstrating handles.Simply run ozoneAnt in the handle directory to build this target.A second "webapp" target builds handle.war, a web application archive suitable foruse in any Servlet 2.2/JSP 1.1 (or higher) environemnt such as Apache's Tomcat.In order to build the webapp target, you must have a suitable Servlet/JSP contextinstalled and properly configured on your system.Run "ozoneAnt webapp" in the handle directory to build the war file.Running it----------Add build/handle.jar to your classpath and start an Ozone server.Command line program: Add build/handle.jar to your classpath and run "ojvm song.SongApp". It will display command line usage information.Web application: Copy build/handle.war to your Servlet/JSP context's webapps directory. Add the user name your web server runs as (e.g. www-data) to ozone   ozoneAdmin newuser -name=www-data -id=133 On Windows the tomcat and ozone user will most likely be the same so no action is required. Configure your web server & JSP context if needed. Restart your JSP context (e.g. tomcat). Once you have everything configured properly, the starting page for the web application for a default tomcat installation should be http://localhost:8080/handle/index.jsp. I should be something similar on another web server. Start by clicking "Add song" (addSong.jsp) to create some songs in the database. After creating several songs, select "Show all songs" (showAllSongs.jsp) to view & edit the songs.About the logfile----------------- The web application uses log4j to write a log file. By default, the log file will be written to ./handle.log.  However, it may not be obvious where that directory is when running in your servlet/JSP context, and the user your web server is running as might not have write permission in that directory. If you are interested in contents of the log file, you may find it helpful to adjust its location. To do so, edit conf/log4j.properties before building the webapp target.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -