WJ-3101-EE5-Lab1

10
Lab 1-1 Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A Lab 1 Placing the Java™ EE Component Model in Context Objectives Upon completion of this lab, you should be able to: Categorize Java EE services Describe the Java EE platform tiers and layers Explain the existing Java SE BrokerTool project

description

java lab

Transcript of WJ-3101-EE5-Lab1

Page 1: WJ-3101-EE5-Lab1

Lab 1

Placing theJava™EEComponent Model inContext

Objectives

Upon completion of this lab, you should be able to:

● Categorize Java EE services

● Describe the Java EE platform tiers and layers

● Explain the existing Java SE BrokerTool project

Lab 1-1Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 2: WJ-3101-EE5-Lab1

Exercise 1: Categorizing Java EE Services

Exercise 1: Categorizing Java EE Services

In this exercise, you complete a matching activity to check yourunderstanding of the Java EE service categories.

Preparation

No preparation is needed for this exercise.

Task

Use Table 1-1 to place each Java EE service in the appropriate servicecategory:

• Persistence

• Scalability

• Naming

• Threading

• Remote objectcommunication

• Connector

• Load Balancing

• Failover

• Security

• Life-cycle services

• Transaction

• Messaging

Table 1-1 Service Categories Exercise

Service Category Java EE Services

Deployment-based services •

API-based services •

Inherent services •

Lab 1-2Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 3: WJ-3101-EE5-Lab1

Exercise 1: Categorizing Java EE Services

Vendor-specific functionality •

Table 1-1 Service Categories Exercise (Continued)

Service Category Java EE Services

Placing the Java™ EE Component Model in Context Lab 1-3Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 4: WJ-3101-EE5-Lab1

Exercise 2: Describing the Java EE Platform Tiers and Layers

Exercise 2: Describing the Java EE Platform Tiers andLayers

In this exercise, you complete a matching activity to check yourunderstanding of the tiers and layers in the Java EE platform.

Preparation

No preparation is needed for this exercise.

Task

Match the number of each description with the corresponding layer inFigure 1-1:

1. Databases and other back-end services

2. API layer

3. Service layer

4. Component layer

Figure 1-1 Layers Exercise

Vendor-neutral

Defined by the J2EE

specification (vendor-neutral)

Vendor-specific

Lab 1-4Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 5: WJ-3101-EE5-Lab1

Exercise 3: Examining the Java SE BrokerTool Application

Exercise 3: Examining the Java SE BrokerTool Application

In this exercise, you examine the existing BrokerTool_SE project. TheBrokerTool_SE project is a Java Platform, Standard Edition (Java SE)Netbeans™ project. This project is similar in function to the project youwill be working on all week.

ABC StockTrading is an established stock trading company that managesportfolios for a small set of clientele. ABC StockTrading had an interndevelop a prototype Java application to manage their clientele. You havebeen hired as a Java developer by ABC to further develop the prototypeas part of a study to modernize their software by leveraging the power ofthe Java EE platform.

This exercise contains the following sections:

● “Task 1 – Opening the BrokerTool_SE Project”

● “Task 2 – Building the BrokerTool_SE Project”

● “Task 3 – Running the BrokerTool_SE Project”

Preparation

This exercise assumes that Netbeans is installed and the BrokerTool_SEproject is present on your system.

Task 1 – Opening the BrokerTool_SE Project

Tool Reference – Java Development: Java Application Projects: OpeningProjects

Complete the following steps:

1. Open the BrokerTool_SE project:

● Project Location: /export/home/student/projects

● Project Name: BrokerTool_SE

● Set as Main Project: (checked)

Placing the Java™ EE Component Model in Context Lab 1-5Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 6: WJ-3101-EE5-Lab1

Exercise 3: Examining the Java SE BrokerTool Application

Task 2 – Building the BrokerTool_SE Project

Tool Reference – Java Development: Java Application Projects: BuildingProjects

Complete the following step:

1. Build the BrokerTool_SE project.

Task 3 – Running the BrokerTool_SE Project

Tool Reference – Java Development: Java Application Projects: RunningProjects

Complete the following steps:

1. Run the BrokerTool_SE project.

2. Using the All Customers tab, view the list of customers. Write downseveral Customer IDs.

3. Click the Customer Details tab. Using a Customer ID that you wrotedown, complete the Customer Identity field and press the GetCustomer button.

4. Try the other buttons.

5. Quit the BrokerTool_SE application.

Lab 1-6Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 7: WJ-3101-EE5-Lab1

Exercise Solutions

Exercise Solutions

Use the following solutions to check your answers to the exercises in thislab.

Solution for Exercise 1: Categorizing Java EE Services

Compare your answers to the service category and Java EE servicesshown in Table 1-2.

Table 1-2 Service Categories Exercise

Service Category Java EE Services

Deployment-based services • Persistence

• Transaction

• Security

API-based services • Naming

• Messaging

• Connector

Inherent services • Life-cycle services

• Threading

• Remote object communication

Vendor-specific functionality • Scalability

• Failover

• Load balancing

Placing the Java™ EE Component Model in Context Lab 1-7Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 8: WJ-3101-EE5-Lab1

Exercise Solutions

Solution for Exercise 2: Describing the Java EEPlatform Tiers and Layers

Compare your answers to the number and description of the layers ofFigure 1-2.

Figure 1-2 Layers Exercise

ComponentLayer

APILayer

ServiceLayer

Vendor-neutral

Defined by the J2EEspecification (vendor-neutral)

Vendor-specific

Databases and otherback-end services

4.

2.

3.

1.

Lab 1-8Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A

Page 9: WJ-3101-EE5-Lab1
Page 10: WJ-3101-EE5-Lab1

Exercise Solutions

Lab 1-10Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A