|
|
Readme
This demo showcases Java DB (Apache Derby) running embedded within a web browser. At the present time, this demo runs on Mozilla Firefox only - The HTML and java-script would have to be modified in order to run on other web browsers such as Microsoft Internet Explorer. This Web application demonstrates how an embedded database can be used to persist data from a tax return being created either online or offline. The application can be deployed manually or automatically using Sun's Java Plug-in with installing the application as a Java Extension. As data is being entered or modified in a tax return field, it is automatically saved locally against the database (Derby); therefore making the "Save" button a useless widget - the cost of accessing Apache Derby embedded is very low and for that reason, we can afford to save the data as it is being updated. If the system or application crashes, data persisted in Derby running embedded will be retrieved automatically the next time the application is run. As Derby meets the ACID (Atomic, Consistent, Isolation, Durable) properties of a relational database system, data will be recovered up to before the crash without loss of committed data or risk of corrupted database. Several technologies are being used as part of this demo but first, the client interface is pure dynamic HTML to render the forms used to enter data - java-script is used to navigate and validate forms' content but it is mostly used to interact with the Client Store service (Derby running embedded locally), referred as the ClientStoreService Object throughout the source code. LiveConnect is used to interact from java-script to Java (the client store service is instantiated in a tiny (~10k) and hidden Java applet. Requirements for this web application demo were:
The deployment options for the database engine and application could be:
Before running this demo, you should look through the following files and directories in the /derby/demo directory:
After running the demo, you will see some new files and directories under the home directory of Mozilla Firefox:
These are the software requirements to run the demo
These are the steps to install and run the demo manually. For an automatic online installation and if you meet the requirements, please access the following section.
NOTE: If you encounter a Security Permission error in the demo, it is very likely that the derby.jar archive has not been copied correctly under the proper lib\ext directory of the JRE used by Firefox...you can check if the demo is working by killing Firefox after having updating some fields in Personal Info or W2 forms - The new updated fields should be there when you restart the demo - the 'Save' buttons are useless with this demo since updates are persisted (saved) automatically at the field level. You can download the EmbeddedDerbyDemo.zip archive and access the source code as well as application files directly. Click here for an automatic installation of the demo as a Java Plug-in Extension. If you meet the requirements to run the demo, you should be able to get it downloaded, installed and run online. The first time the demo is accessed from the web server, the (signed) derby.jar and demo.jar will get downloaded and archived locally on the client platform with a particular version number - The next time you invoke the application online, the required demo JAR files will not be downloaded again if the version has not changed - hence the demo application will be accessible right away if the JARs on the server side haven't changed. Note that even in online mode, all the data persistence will be done locally against Derby running embedded as part of the demo and web browser. It is like running in disconnected mode, except the web application files are downloaded from the server and JAR versioning verification is done against the local archived JARs. If you see "Warning - Security" pop-up windows upon loading the demo, please grant trust to the demo application by clicking on the 'Yes' button - as derby.jar has been signed with a 'test' certificate, this last one cannot be fully trusted by the web browser - more information related to this security topic. Apache Derby (core engine) downloadable footprint can be reduced considerably with online applications run via Sun Java Plug-in or JNLP . Effectively, derby.jar can be reduced from 2MB down to ~600KB by using Pack200 Java 5 compression. This makes even Apache Derby much faster to download for web applications requiring a local cache. You can find more information at the following blog.
|
RelatedApache Derby ProjectTools That Support Java DBProducts That Use Java DBTechnology Inside Java DB |
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||