uCosminexus Application Server

First Step Guide

3020-3-Y00-10(E)

Contents

Notices

Summary of amendments

Preface

1. About This Manual

1.1 Contents that can be studied in this manual

1.1.1 Setting up the development environment and executing a sample (Chapter 2)

1.2 Points to note related to the descriptions in this manual

2. Creating a Development Environment and Executing a Sample Project

2.1 Flow of executing the sample project in the development environment

2.2 Setting up environment variables and installing Developer

2.2.1 Setting up environment variables

2.2.2 Installing Developer

2.3 Creating the debug environment

2.4 Preparing Eclipse

2.5 Setting up Eclipse

2.6 Checking the JDK used with Eclipse

2.7 Starting the database

2.8 Executing the sample project (Bank)

2.8.1 Starting Eclipse

2.8.2 Creating server runtime

2.8.3 Creating a J2EE server

2.8.4 Importing the sample project (Bank)

2.8.5 Creating a table

2.8.6 Debugging the sample project (Bank)

Appendix

A. Glossary

[Trademarks]

All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.

Notices

Relevant program products

See the manual uCosminexus Application Server Overview.

Export restrictions

If you export this product, please check all restrictions (for example, Japan's Foreign Exchange and Foreign Trade Law, and USA export control laws and regulations), and carry out all required procedures.
If you require more information or clarification, please contact your Hitachi sales representative.

Trademarks

AMD is a trademark of Advanced Micro Devices, Inc.
Intel is a trademark of Intel Corporation in the U.S. and/or other countries.
Internet Explorer is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.
Linux(R) is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microsoft is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Windows, Windows Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
The other company names and product names are either trademarks or registered trademarks of the respective companies.
Eclipse is an open development platform for tools integration provided by Eclipse Foundation, Inc., an open source community for development tool providers.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
Throughout this document Hitachi has attempted to distinguish trademarks from descriptive terms by writing the name with the capitalization used by the manufacturer, or by writing the name with initial capital letters. Hitachi cannot attest to the accuracy of this information. Use of a trademark in this document should not be regarded as affecting the validity of the trademark

Microsoft product screen shots

Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.

Microsoft product name abbreviations

This manual uses the following abbreviations for Microsoft product names:

Abbreviation
Full name or meaning

Internet Explorer
Microsoft(R) Internet Explorer(R)

Windows(R) Internet Explorer(R)

Windows
Windows Server 2008
Windows Server 2008 x86
Windows Server 2008 x64
Windows Server 2008 R2
Microsoft(R) Windows Server(R) 2008 Standard 32-bit

Microsoft(R) Windows Server(R) 2008 Enterprise 32-bit

Microsoft(R) Windows Server(R) 2008 Standard

Microsoft(R) Windows Server(R) 2008 Enterprise

Microsoft(R) Windows Server(R) 2008 R2 Standard

Microsoft(R) Windows Server(R) 2008 R2 Enterprise

Microsoft(R) Windows Server(R) 2008 R2 Datacenter

Windows Server 2012
Windows Server 2012 Standard
Microsoft(R) Windows Server(R) 2012 Standard

Windows Server 2012 Datacenter
Microsoft(R) Windows Server(R) 2012 Datacenter

Windows XP
Microsoft(R) Windows(R) XP Professional Operating System

Windows Vista
Windows Vista Business
Microsoft(R) Windows Vista(R) Business (32-bit)

Windows Vista Enterprise
Microsoft(R) Windows Vista(R) Enterprise (32-bit)

Windows Vista Ultimate
Microsoft(R) Windows Vista(R) Ultimate (32-bit)

Windows 7
Windows 7 x86
Microsoft(R) Windows(R) 7 Professional (32-bit)

Microsoft(R) Windows(R) 7 Enterprise (32-bit)

Microsoft(R) Windows(R) 7 Ultimate (32-bit)

Windows 7 x64
Microsoft(R) Windows(R) 7 Professional (64-bit)

Microsoft(R) Windows(R) 7 Enterprise (64-bit)

Microsoft(R) Windows(R) 7 Ultimate (64-bit)

Windows 8
Windows 8 x86
Windows(R) 8 Pro (32-bit)

Windows(R) 8 Enterprise (32-bit)

Windows 8 x64
Windows(R) 8 Pro (64-bit)

Windows(R) 8 Enterprise (64-bit)

Note that Windows 32 bit and Windows 64 bit are sometimes respectively referred to as Windows x86 and Windows x64.

Restrictions

Information in this document is subject to change without notice and does not represent a commitment on the part of Hitachi. The software described in this manual is furnished according to a license agreement with Hitachi. The license agreement contains all of the terms and conditions governing your use of the software and documentation, including all warranty rights, limitations of liability, and disclaimers of warranty.
Material contained in this document may describe Hitachi products not available or features not available in your country.
No part of this material may be reproduced in any form or by any means without permission in writing from the publisher.
Printed in Japan.

Issued

Aug. 2013: 3020-3-Y00-10(E)

Copyright

All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.

Summary of amendments

The following table lists changes in the manual 3020-3-Y00-10(E) for uCosminexus Application Server 09-50, uCosminexus Application Server(64) 09-50, uCosminexus Client 09-50, uCosminexus Developer 09-50, uCosminexus Service Architect 09-50, uCosminexus Service Platform 09-50, uCosminexus Service Platform(64) 09-50 and product changes related to the manual:

Added or changed contents | Change location
A procedure is added for using the Eclipse setup functionality to configure the Eclipse environment. | 2.5
The description of notes has been moved from Release Notes. | 1.2

In addition to the above changes, minor editorial corrections have been made.

Preface

For details on the prerequisites before reading this manual, see the manual uCosminexus Application Server Overview.

Non-supported functionality

Some functionality described in this manual is not supported. Non-supported functionality includes:

Audit log functionality

Compatibility functionality

Cosminexus Component Transaction Monitor

Cosminexus DABroker Library

Cosminexus Reliable Messaging

Cosminexus TPBroker and VisiBroker

Cosminexus Web Service - Security

Cosminexus XML Security - Core functionality

JP1 linkage functionality

Management portal functionality

Migration functionality

SOAP applications complying with specifications other than JAX-WS 2.1

uCosminexus OpenTP1 linkage functionality

Virtualized system functionality

XML Processor high-speed parse support functionality

Non-supported compatibility functionality

"Compatibility functionality" in the above list refers to the following functionality:

Basic mode

Check of JSP source compliance (cjjsp2java) with JSP1.1 and JSP1.2 specifications

Database connection using Cosminexus DABroker Library

EJB client application log subdirectory exclusive mode

J2EE application test functionality

Memory session failover functionality

Servlet engine mode

Simple Web server functionality

Switching multiple existing execution environments

Using EJB 2.1 and Servlet 2.4 annotation

1. About This Manual

This chapter describes the experience that you can gain from reading this manual and how to read this manual.

Organization of this chapter

1.1 Contents that can be studied in this manual

1.2 Points to note related to the descriptions in this manual

1.1 Contents that can be studied in this manual

The purpose of this manual is to guide you through procedures from the setting up of the Application Server environment to the execution of a sample, while actually operating a machine.

You cannot set up the environment that you will be using in actual business (environment for actual operations), with this manual. To set up an environment for actual operations, you must first study the functionality and the system configuration you want to use.

For details on setting up the environment for actual operations, see the following manuals:

To set up the development environment for actual operations

uCosminexus Application Server Application Development Guide

To set up the execution environment for actual operations

uCosminexus Application Server System Setup and Operation Guide

This section describes the contents that you can study in this manual.

Organization of this section

1.1.1 Setting up the development environment and executing a sample (Chapter 2)

1.1.1 Setting up the development environment and executing a sample (Chapter 2)

In the development environment, Eclipse is used to develop J2EE applications.

This manual describes procedures from the creation of the environment in which Eclipse can be used until the operations of Eclipse during debugging. If you proceed with the operations according to the given procedure, you can experience how to create a development environment and how to use the sample project (Bank) to perform the Eclipse debug operations. You can use the sample project (Bank) for transferring the funds of a user, having a user ID entered through a Web browser, from a current account to a savings account.

Note

The environment set up by using this manual will be an environment with the default values specified. To customize the environment, see the uCosminexus Application Server Application Development Guide, and then set up the development environment.

1.2 Points to note related to the descriptions in this manual

Note the following points when you read this manual:

Starting from the command prompt

In this manual, you use the command prompt to execute commands when you use Windows.

To operate the command prompt, from the Windows Start menu, go to All Programs, choose Accessories, and then Command Prompt.

This manual mainly describes Windows 7 as the OS used. In the case of using any other version of Windows, replace and read the operations in accordance with the OS you use.

Supporting Eclipse

Chapter 2 of this manual describes the procedure for using the functionality provided by Developer to build the Eclipse environment. Only the Eclipse plug-in functionality provided by Developer is supported. The user must check how to use Eclipse and troubleshoot the errors displayed by Eclipse, and take appropriate actions.

Using the language pack

Chapter 2 of this manual uses an Eclipse menu notation applying the BABEL Japanese Language Pack 2012/7/21, provided by Eclipse Babel Project. The notations might differ depending on the language pack version you will be using.

Installation directory

The installation directory of Application Server is as follows:

In Windows
The default installation directory of Application Server and Developer is System-drive:\Program Files\Hitachi\Cosminexus. In a WOW64 (Windows On Windows 64) environment, the default installation directory is System-drive:\Program Files(x86)\Hitachi\Cosminexus. When installing in another directory, replace Application-Server-installation-directory or Developer-installation-directory wherever mentioned in this manual with the directory you use, according to the environment.
Note that you can also specify %COSMINEXUS_HOME% for Application-Server-installation-directory.
%COSMINEXUS_HOME% is the environment variable that the product installer sets.

In UNIX
The installation directory of Application Server is /opt/Cosminexus/.

Notations of menu names for Windows

The following OSs are the pre-requisites for the notations of menu names for Windows, mentioned in this manual:

In the case of a machine used for configuring an execution environment

Windows Server 2008

In the case of a machine used for configuring a development environment

Windows 7 or Windows XP

If you use Windows 8 or Windows Server 2012, the Start menu is not displayed. Therefore, select the menu from the Start window that can be displayed from the bottom left side of the window.

2. Creating a Development Environment and Executing a Sample Project

This chapter describes the procedure for creating the development environment and the debug environment, and then executing the Developer-provided sample project (Bank).

Organization of this chapter

2.1 Flow of executing the sample project in the development environment

2.2 Setting up environment variables and installing Developer

2.3 Creating the debug environment

2.4 Preparing Eclipse

2.5 Setting up Eclipse

2.6 Checking the JDK used with Eclipse

2.7 Starting the database

2.8 Executing the sample project (Bank)

2.1 Flow of executing the sample project in the development environment

This chapter describes the procedure for using the Development Environment Instant Setup function provided by Developer to configure the debug environment and then execute the sample project (Bank).

You can use the Development Environment Instance Setup functionality provided by Developer to easily set up the environment for executing sample programs.

The following figure shows the development environment that is created in this chapter, and the sample project (Bank).

Figure 2-1 System and the sample program (Bank) to be set up using the Development Environment Instant Setup functionality

By using the sample project (Bank), you can gain the experience of a tutorial about the debug operations of the Eclipse-provided development support functionality, and the creation and connection of the embedded database. Therefore, you can better understand the procedure for using databases through Eclipse to develop J2EE applications.

The following figure shows the procedure for creating the environment and executing the sample project (Bank).

Figure 2-2 Flow of operations from the creation of the environment to the execution of the sample project (Bank)

Overview of each operation

Setting up environment variables and installing Developer
This section describes the procedure for setting up the required environment variables and installing Developer. For details, see 2.2 Setting up environment variables and installing Developer.

Creating the debug environment
This section describes the procedure for creating the debug environment using the Development Environment Instant Setup functionality. For details, see 2.3 Creating the debug environment.

Preparing Eclipse
This section describes the preparations for installing Eclipse to be used with the development environment. For details, see 2.4 Preparing Eclipse.

Setting up Eclipse
This section describes the procedure for setting up an Eclipse environment. For details, see 2.5 Setting up Eclipse.

Checking the JDK used with Eclipse
This section describes the procedure for confirming that the JDK used with Eclipse is specified. For details, see 2.6 Checking the JDK used with Eclipse.

Starting the database
This section describes the procedure for starting the embedded database set up with the Development Environment Instant Setup functionality.
Note that the embedded database starts automatically after the debug environment is set up with the Development Environment Instant Setup functionality, so this operation is not required. For details, see 2.7 Starting the database.

Executing the sample project (Bank)
This section describes the procedure for executing the sample project (Bank) using the created environment. For details, see 2.8 Executing the sample project (Bank).

Hereafter, the operations required to execute the sample project (Bank) are described according to the above procedure.

2.2 Setting up environment variables and installing Developer

This section describes how to set up the environment variables required for using Developer, and how to install Developer.

Organization of this section

2.2.1 Setting up environment variables

2.2.2 Installing Developer

2.2.1 Setting up environment variables

First, you set up the environment variables required for using Developer.

Note

The following procedure is for Windows XP: When using an OS other than Windows XP, follow the respective procedures to set up the environment variables for each OS.

Operation procedure

To set up the environment variables required for using Developer:

From the Windows menu bar, select Control Panel, and then System.
The System Properties dialog box appears.

Under the Advanced tab, click the Environment Variables button.
The Environment Variables dialog box appears.

If the variable TZ exists within the System variables frame, select the variable TZ, and then click the Edit button. If the variable TZ does not exist, click the New button.
A dialog box for editing or adding the system environment variables appears.

Set up the following value:

Variable name | Variable value
TZ | JST-9

When using in Japan, specify JST-9 in the time zone (TZ).

When the environment variable TZ already exists and JST-9 has not been set up, select the specified variable name, and click the Edit button. A dialog box appears. Add or change the values of the environment variables in the displayed dialog box.

When the environment variable TZ does not exist, click the New button. A dialog box appears. Add environment variables and values in the displayed dialog box.

Click the OK button.
The dialog box for editing or adding the system environment variables closes.

If the System environment variables box has a variable Path, select the variable Path, and click the Edit button. If the variable Path does not exist, click the New button.
A dialog box for editing or adding the system environment variables appears.

Specify the following values.
When editing the variable Path, add the following value at the beginning. Replace the Developer-installation-directory with the actual directory to be used.

Variable name | Variable value
Path | Developer-installation-directory\jdk\bin

When the environment variable Path already exists, select the variable name to be specified, and click the Edit button. A dialog box appears. In the displayed dialog box, add the value of the environment variable at the beginning. Replace the Developer-installation-directory with the actual directory to be used.

When the environment variable Path does not exist, click the New button. A dialog box appears. Add environment variables and values in the displayed dialog box.

Click the OK button.
The dialog box for editing or adding the system environment variables closes.

In the Environment Variables dialog box, click the OK button.
The Environment Variables dialog box closes.

In the System Properties dialog box, click the OK button.
The System Properties dialog box closes, and the setup of environment variables completes.

At this stage, the setup of environment variables required for using Developer is completed.

2.2.2 Installing Developer

Install Developer according to the following procedure:

Note

Before installing the Developer, close all Windows applications.

Operation procedure

To install Developer:

Set up the installation CD-ROM in the CD-ROM drive.
A message "The selected software will be installed." appears in the Hitachi Integrated Installer dialog box.
If the Hitachi Integrated Installer dialog box does not appear, use Explorer and double-click HCD_INST.EXE in the CD-ROM directory.

Select uCosminexus Developer and then click the Install button.
A warning message "Installation will start now. Do you wish to continue?" appears in the Confirm Starting of Installer - Hitachi Integrated Installer dialog box.

Click the OK button.
The Welcome to the uCosminexus Developer Setup Program page appears.

Click the Next button.
The Choose Destination Location page appears.

As and when required, select the installation destination directory, and then click the Next button.

Hint

To execute the procedure from 2.3 onward, the installation destination directory to be selected here must meet the following condition:

Length of the path Installation-directory-of-Developer\ADP\DB must be within 80 bytes.

When you install Developer, the ADP and DB directories are created automatically. Therefore, specify the installation destination directory so that the path will be within 73 bytes.

The Select Features page appears.

Click the button on the left of Standard - (Recommended).
The Customer Information page appears.

Enter the correct name in User Name and Company Name, and then click the Next button.
The Select Program Folder page appears.

As and when required, change the program folder name, and then click the Next button.
The Start the installation page appears.

Check the set up details, and if no problem exists, click the Next button.
The installation starts. Once the installation is completed, the Completing the Setup dialog box appears. The installation might take a few minutes to complete.

Click the Finish button.
A window to confirm whether to reboot the OS appears.

Click the Yes button.
The OS will reboot, and the installation of Developer will complete.

At this stage, Developer is installed.

2.3 Creating the debug environment

Use the Development Environment Instant Setup functionality to create the debug environment.

Note

The user must have administrator privileges (administrator privileges mode, if the OS is Windows 7, Windows 8, or Windows Vista), for executing the Development Environment Instant Setup functionality.

Operation procedure

From the Start menu, select All Programs, Cosminexus, First Setup, and then Setup Debugging Environment.
The Select the Type of Setup page of the Setup - Development Environment Instant Setup dialog box appears.

Select Standard, and then click the Next button.
The Setup Embedded Database User page appears.

Hint

If you cannot select Standard, this might be due to the following factors:

The required file or directory does not exist or the length of the path is exceeding the required limit.

The port number specified in the Development Environment Instant Setup functionality is a duplication of the port number being used in the system.

If a port number is duplicated, select Custom, and then choose a port number that is not duplicated.

For details, see 2.3.3 Setting contents of the environment to be setup and 2.3.4 Standard setup of the debug environment in the uCosminexus Application Server Application Development Guide.

Click the Next button.
The Confirm Setup Details page will appear.

The settings will be displayed in the Setup details area. For details about the settings of the environment created with Standard Setup, see 2.3.3 Settings for the environment to be set up in the uCosminexus Application Server Application Development Guide.
The password of the embedded database is displayed with eight asterisks (*), irrespective of the specified values.

Click the Execute button.
The Progress Status page appears, and the setup executes. The setup might take a few minutes to complete.
When the setup is completed, the Setup Results page appears.

Click the Finish button.
The Setup - Development Environment Instant Setup dialog box closes.

At this stage, the creation of the debug environment is complete.

2.4 Preparing Eclipse

You prepare the environment for using Eclipse. Use the following procedure to prepare an archive file for Eclipse:

Operation procedure

Acquire the archive file of Eclipse.
Acquire the following archive file of Eclipse from the attached article supplied with Developer or the download site of Eclipse.org:

In the case of Windows x86 (including the WOW64 environment)

eclipse-jee-juno-SR1-win32.zip

In the case of Windows x64

eclipse-jee-juno-SR1-win32-x86_64.zip

Save the acquired archive file of Eclipse in the following directory:
Developer-installation-directory\ADP\Archives

With this, the preparation for installing Eclipse is complete.

2.5 Setting up Eclipse

You use the Eclipse setup functionality to set up the Eclipse environment.

Note

The user must have administrator privileges (administrator privileges mode, if the OS is Windows 7, Windows 8, or Windows Vista), for executing the Eclipse setup functionality.

Operation procedure

From the Start menu of Windows, select All Programs, Cosminexus, First Setup, and then Setup Eclipse.
A dialog box appears for confirming the preparation of the archive file of Eclipse.

In the confirmation dialog box, click the OK button.
The Eclipse installation page appears.

In the Eclipse installation page, specify the installation and archive directories of Eclipse, and then click the Next button.
The Confirm Setup Details page appears.

Check the contents of the Confirm Setup Details page, and click the Execute button.
The Progress Status page appears, and the setup executes. When the setup is completed, the Setup Results page appears.
The Eclipse setup might take a few minutes to complete.

On the setup completion page, click the Finish button.
The Setup - Eclipse setup dialog box closes, and the setup of Eclipse finishes.
A short cut of Eclipse is created on the Desktop.

With this, the Eclipse environment setup is completed.

2.6 Checking the JDK used with Eclipse

Check that the JDK provided with the Developer is set up as the JDK to be used with Eclipse.

Double-click the short cut of Eclipse on the Desktop to start Eclipse, and then proceed with the subsequent operations. Note that, here, the Setting Workspace and Directory window appears.

Operation procedure

From the Eclipse menu bar, select Window, and then Preferences.
The Preferences dialog box will appear.

In the left pane, select Java, and then Installed JREs.
The Installed JREs page will appear in the right pane.

Check if the JDK displayed in the list is the JDK provided with Developer.
Check if the following path is displayed in Location:

Developer-installation-directory\jdk

Take the following action when the path is displayed or when the path is not displayed:

When the path is displayed
Check if the Name check box is selected or not. If the Name check box is not selected, select the checkbox.

When the path is not displayed
Click the Add button, and set up the above path. After setting up the path, select the Name check box.

Click the OK button.
The settings will be saved.

At this stage, the verification of settings of the JDK to be used with Eclipse is completed.

2.7 Starting the database

In the sample project (Bank), use the embedded database set up with the Development Environment Instant Setup functionality. Note that immediately after using the Development Environment Instant Setup functionality to create the debug environment, the embedded database is automatically started, so the operation for starting the database is not required.

When the embedded database is stopped, execute the following operation to start the embedded database.

Note

For starting or stopping the embedded database, the user must have administrator privileges (administrator privileges mode, if the OS is Windows 7, Windows 8 or Windows Vista).

Operation procedure

From the Start menu of Windows, select All programs, Cosminexus, and then Start the database.
When the embedded database is started, a message, showing that the embedded database is started, is displayed in the Command Prompt.
For stopping the embedded database, select All programs, Cosminexus, and then Stop the database from the Start menu of Windows.

2.8 Executing the sample project (Bank)

Execute the sample project (Bank) in the created debug environment.

Organization of this section

2.8.1 Starting Eclipse

2.8.2 Creating server runtime

2.8.3 Creating a J2EE server

2.8.4 Importing the sample project (Bank)

2.8.5 Creating a table

2.8.6 Debugging the sample project (Bank)

2.8.1 Starting Eclipse

When executing the sample project, to use Eclipse to create database tables, a user having administrator privileges (administrator privileges mode, if the OS is Windows 7, Windows 8, or Windows Vista) must start Eclipse. Note that a user not having the administrator privileges can also start Eclipse. If Eclipse is already started, you need not execute the following procedure.

Operation procedure

Eclipse starts when you double-click the short cut of Eclipse on the Desktop.

2.8.2 Creating server runtime

You create the server runtime for using a J2EE server with Eclipse.

When Eclipse is started, and InstantJ2EEServer at localhost appears in the Servers view, this activity is not required.

Figure 2-3 Example of displaying InstantJ2EEServer at localhost in the Servers view

Operation procedure

From the Eclipse menu, select Window, and then Preferences.
The Preferences dialog box appears.

In the Preferences dialog box, select Server, and then Runtime Environments.
The Server Runtime Environments page appears.

Click the Add button.
The New Server Runtime Environment dialog box appears.

On the New Server Runtime Environment page, first select Cosminexus, Cosminexus J2EE, and then click the Finish button.
The server runtime for operating the J2EE server with Eclipse is created.

In the Settings dialog box, click the OK button.
The settings are saved.

At this stage, the settings for using the J2EE server are specified.

2.8.3 Creating a J2EE server

You create a J2EE server to be operated with Eclipse.

When Eclipse is started, and InstantJ2EEServer at localhost appears in the Server view, this activity is not required.

Operation procedure

From the Eclipse menu, select File, New, and then Other.

In the New dialog box, select Server and Server, and then click the Next button.
The Define New Server page of the New Server dialog box appears.

In the New Server dialog box, select Cosminexus and J2EE server, and then click the Next button.
The J2EE Server page appears.

On the J2EE Server page, select localhost in Connection Host for Remote Management Function. If you are not logged in, click the Login button to log in.
You are connected to the Management Server Remote Management Function, and the J2EE server, you want to connect to, appears in the list of servers.

On the J2EE Server page, select InstantJ2EEServer in the list of servers, and then click the Finish button.
The J2EE server is created.

2.8.4 Importing the sample project (Bank)

Import the sample project (Bank) into the workspace of Eclipse.

Operation procedure

To import the sample project (Bank) into the workspace of Eclipse:

From the Eclipse menu bar, choose File, and then Import.
The Import dialog box will appear.

In the Import dialog box, choose General, and then move the Existing Projects into Workspace. Click the Next button.
The Import Projects page will appear.

Select the Select archive file radio button, and then click the Browse button.
The Select Archive Containing the Projects to Import dialog box appears.

Select Developer-installation-directory\ADP\samples\Bank.zip, and then click the Open button.
In the Projects area of the Import projects page, a list of projects included in Bank.zip appears.

Check all items in the Projects area of the Import projects page, and then click the Finish button.
The sample project (Bank) will be imported in the workspace of Eclipse.

Note

If a build error occurs in the imported sample project (Bank), change the target runtime by using the Property of the project. The procedure for changing the target runtime is as follows:

In the Project Explorer view#, select the Bank project.

From the menu of Eclipse, select Project, and then Property.
The Property: Project-name dialog box appears.

In the left side pane of the Property: Project-name dialog box, select Target runtime.
The Target Runtime page appears.

Select the check box of the created target runtime, and click the OK button.
The target runtime is changed.

#

Display the Project Explorer view, by selecting Windows, Display view, and then Project Explorer.

At this stage, the sample project (Bank) is imported.

2.8.5 Creating a table

Create the table to be used with the sample project (Bank).

Note

Before creating a table, confirm the existence of the following conditions:

The embedded database is running
For details about how to start the embedded database, see 2.7 Starting the database.

The J2EE server has stopped
Make sure that the status of InstantJ2EEServer at localhost is Stopped in the Servers view.

Operation procedure

To create the table to be used with the sample project (Bank):

In the Project Explorer view, select BankDBBatch, and then bank_tblcreate.bat. Next, right click to select Open with, and then Text Editor.
The bank_tblcreate.bat file is opened in the Text Editor of Eclipse.

Confirm that the user ID specified in the fifth row and the password specified in the sixth row of the bank_tblcreate.bat file are as follows:

set USER="USER1"
set PSWD=

After confirmation, close the Text Editor of Eclipse.

In the Project Explorer view, select BankDBBatch, and then bank_tblcreate.bat. Next, choose Open with, Default Editor by right click.
The Command Prompt will start, and the contents of the bank_tblcreate.bat file will execute. When the table for the sample project (Bank) is created, a message indicating that the table has been created successfully will be displayed in the Command Prompt.

Reference note

When you successfully create a table, the return code 0 is displayed.

At this stage, the table to be used with the sample project (Bank) is created.

2.8.6 Debugging the sample project (Bank)

Deploy the sample project (Bank) that was imported in 2.8.4 Importing the sample project (Bank) on to a J2EE server, and then check whether the project runs properly.

Organization of this subsection

(1) Deploying the sample project (Bank)

(2) Operating the sample project (Bank)

(1) Deploying the sample project (Bank)

To deploy the sample project (Bank).

Operation procedure

In the Project Explorer view, select Bank, right click to select Debug As, and then Debug on Server.
The Debug on Server dialog box appears.

In the Debug on Server dialog box, select localhost and InstantJ2EEServer at localhost in the list of servers, and then click the Finish button.
The J2EE server (InstantJ2EEServer) starts, the sample project (Bank) is published, and a Web browser is accessed at the same time, and the sample application (Bank) window appears in the Web browser.
Note that at this time, the J2EE server (InstantJ2EEServer) starts in the debug mode.

(2) Operating the sample project (Bank)

The sample project (Bank) is a program for transferring the funds of the specified user from the Checking Account to the Savings Account.

If you perform the following operations, the specified funds will be remitted from the Checking Account to the Savings Account of the specified user:

Operation procedure

In the displayed window, enter the User ID of the user who sends the remittance, and also enter the Transaction amount.
Enter the following values in this window:
User ID: 001
Transaction amount: 500

Click the Transfer button.
In the displayed table of this window, confirm that the Checking Account balance of the User ID "001" is reduced to "9500" and that the Savings Account balance is increased to "1000".

The funds are managed in the database. The Checking Account table and Savings Account table are updated during the fund transfer. You can verify the updated amount that is applied in the table displayed in the same window.

With this, the operations of the sample project (Bank) described in Chapter 2 are completed.

Appendix

Organization of the appendixes

A. Glossary

Appendix A. Glossary

Terminology used in this manual

See the uCosminexus Application Server and BPM/ESB Platform Terminology Guide.

Trademarks

AMD is a trademark of Advanced Micro Devices, Inc.
Intel is a trademark of Intel Corporation in the U.S. and/or other countries.
Internet Explorer is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.
Linux(R) is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microsoft is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Windows, Windows Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
The other company names and product names are either trademarks or registered trademarks of the respective companies.
Eclipse is an open development platform for tools integration provided by Eclipse Foundation, Inc., an open source community for development tool providers.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
Throughout this document Hitachi has attempted to distinguish trademarks from descriptive terms by writing the name with the capitalization used by the manufacturer, or by writing the name with initial capital letters. Hitachi cannot attest to the accuracy of this information. Use of a trademark in this document should not be regarded as affecting the validity of the trademark