Create a Derby calendar, part 3rd

Source: Internet
Author: User
Tags ibm db2 tomcat

Before you start

This tutorial is written for developers who need to work with multiple users at the same time on a single Derby (or IBM cloudscape™) database. It is also helpful for developers who want to learn more about building Java GUI applications.

About this tutorial

In the 1th part, we use Java Database Connectivity (JDBC) to connect to the database, creating the basic entity classes. Part 2nd uses these classes to create applications, first the GUI interface, and then the Web-based interface that analyzes the different ways in which you embed or integrate Derby into your application. Single-user embedded applications are transformed into multi-user network applications that resolve concurrency problems by giving each user a separate schema.

Although the 2nd part of the application allows multiple users, users cannot view data from other users. In this tutorial, you will create a public calendar by moving all the data to the default mode, using locks and transactions in Derby to control concurrency issues.

In this tutorial, you will learn:

How to create a date selector.

How to display the information table using Java code.

How to make the data in a table editable.

How to create and use database transactions.

Select different types of exceptions.

Database isolation level and its use.

Different types of database locks.

The scope of the database lockdown.

The type of lock that cannot be controlled.

Prerequisite

This tutorial includes building and modifying Java GUI applications, so you have at least a basic understanding of the Java language to master everything in this tutorial. There is at least a basic understanding of how Derby works. The necessary background is available through part 1th, "Understanding JDBC" and part 2nd "Embedding Options" (developerworks,2005 year September).

System Requirements

Apache Derby is an open source center for IBM Cloudscape databases with many of the latter features, such as low memory footprint, easy embedding of applications (for more information on Cloudscape, see Resources for links). Derby also provides easy upgrade paths to other databases, such as IBM db2®.

The following tools are required to read this tutorial:

Java 2 Platform, Standard Edition 1.4.2 or higher. Note that you must have a Java Developer Kit, not just the Java Runtime environment. Download Java code from the Sun Web site.

An existing application. The application created in part 2nd is modified in this tutorial. Download these class files.

Apache Derby can be downloaded from Apache Software Foundation.

JavaMail. Sending a message reminder requires Mail.jar, which does not belong to the Java package. Activation.jar is also required and can be downloaded as part of the JavaBeans activation framework. These two files must be in the classpath.

WEB application servers, such as Apache Jakarta Tomcat. You can use any application server that is compatible with the servlet, but this tutorial uses Tomcat Version 5.5.

Jcalendar. To make the interface more user-friendly, we'll add a date selector to the application. Download the necessary libraries.

Text Editor or integrated development environment (IDE). Using an IDE like Eclipse makes it easy to create a Derby application, but I assume you are using a simple text editor.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.