Using WSAD to develop a BMP EJB based Java application-user registration and management

Source: Internet
Author: User
Tags db2

A Introduction

The EJB1.1 specification divides EJBS into two types: Session beans and entity beans. A session bean is a encapsulation of a business process, like a verb that describes a business process and method; An entity bean is a encapsulation of business data, like a noun, that describes business data, which is usually the object of a database record.

Entity beans are divided into CMP (Container Management bean-container management persistence) and BMP (Bean Management Bean-bean management persistence). CMP encapsulates a complex database storage mechanism, to provide us with the creation of data records, load, find, and delete methods, we need to develop the CMP and the data table mapping, and then call the appropriate method to complete the operation of the datasheet, which greatly reduced our development, but We also lose the flexibility to manipulate the database. So when we are developing, we will sometimes use BMP to complete our work.

This tutorial demonstrates how to use BMP to develop a complete application, including a complete database additions and deletions to the demo. Also, this tutorial shows you how to use Wsad to develop and test a Java EE application.

Two Application description

In this application, we will start from scratch using Wsad and DB2 to complete the following functions:

The user registers, for the sake of simplicity, we only need the user to provide his login account number, the password and the email can register. (Increase record)

User Login (Find specified record)

User changes password or email (update record)

Admin View all registered users (Find records)

Administrators Delete registered users (delete records).

Three Preparatory work

Before we start development, we're going to do the following

There is a good performance of the development machine is necessary, the recommended memory of 512M.

Install WSAD4.03 (Download trial version here)

If you are using Wsad for the first time, take a look at its help to familiarize yourself with its development environment.

Install DB2 UDB 7.2 (Download the trial version here)

Please follow the installation guide and create a db2admin administrator account prior to installation, the password is db2admin and set up to use this account to access the database at installation time

To upgrade DB2 JDBC driver to jdbc2.0, follow these steps:

Stop the DB2 "DB2 JDBC Applet Server" service

C:\net stop "DB2 JDBC Applet Server"

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.