Title: Arial 28pt. - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Title: Arial 28pt.

Description:

Borland JBuilder 10 Enterprise. Sybase ASA 8. Borland JBuilder 10 EAServer plug-in. http://www.sybase.com/detail?id=1028173#install ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 39
Provided by: fellenm
Category:
Tags: 28pt | arial | borland | title

less

Transcript and Presenter's Notes

Title: Title: Arial 28pt.


1
J2EE Entity Beans and CMP in EAServer using
Sybase ASA
Robert Nicholson IT Programmer /
Analyst rnichols_at_usoe.k12.ut.us August 17, 18
2004
2
Instructor
  • Robert Nicholson IT Programmer / Analyst
  • rnichols_at_usoe.k12.ut.us
  • Utah State Office of Education

3
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

4
Assumptions
  • You have installed
  • Sybase EAServer 5.x
  • Borland JBuilder 10 Enterprise
  • Sybase ASA 8
  • Borland JBuilder 10 EAServer plug-in
  • http//www.sybase.com/detail?id1028173install
  • You have some experience working with JBuilder 10
  • You are familiar with the EAServer Manager
    Interface

5
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

6
EJB / EAServer Structure
7
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

8
JBuilder to ASA Configuring Data Sources
  • Add JConnect5.5 to the database section of the
    Tools Menu gt Enterprise Setup
  • Configure a new Database URL using the Database
    Pilot on the Tools Menu (optional)
  • Driver com.sybase.jdbc2.jdbc.SybDriver
  • URL jdbcsybaseTdslocalhost2638
  • Note Other databases can be used if the Driver,
    URL, and other parameters are known

9
Database Pilot
10
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

11
Create the JBuilder Project Step 1
12
Create the JBuilder Project Step 2
13
Create the JBuilder Project Step 3
14
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

15
Steps Used in Creating the EJB
  • Create an EJB Module
  • Import Schema from Database
  • Use imported schema structure to Create CMP 2.0
    Entity Bean
  • Add an overloaded ejbCreate() method

16
Creating the EJB Module Step 1
17
Creating the EJB Module Step 2
18
Import Schema From ASA Database
  • If using Data Pilot
  • Select Choose Existing Connection
  • Choose the connection from the list
  • Verify schema properties
  • Take note of JNDI name
  • Used for CMP in EAServer
  • Should match Connection Cache name in EAServer

19
Creating the CMP Entity Bean
  • Using a table in the DB schema / Structure Pane
  • Create CMP 2.0 Entity Bean (EJB)

20
CMP Entity Bean Properties
  • Using the EJB Designer
  • Specify the JNDI name
  • Update Class Definitions specifying correct
    package name
  • Select Local/Remote interfaces

21
CMP Entity Bean Properties
  • Specify the JNDI name using the DD Editor

22
CMP Entity Bean Properties
  • Select Local/Remote Interfaces
  • Update Class Definitions specifying correct
    package name

23
CMP Entity Bean New ejbCreate() Method
  • Add an overloaded ejbCreate() method
  • In EJB Designer right-click bean
  • Select Add gt ejbCreate

24
CMP Entity Bean New ejbCreate() Method
  • In EJB Designer
  • Rename new method to ejbCreate
  • Add method parameters
  • Method logic follows

25
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

26
Create Web Application / EJB Client
  • Add new Web Module (WAR)
  • Change name on step 2
  • Change standards on step 2 (if desired)
  • Accept all other defaults

27
Add new Web Module (WAR) Step 1
28
Add New Web Module (WAR) Step 2
29
Add New Web Module (WAR) Step 3
30
Add JSP Page to Web Module
  • Add a new JSP to the Web Module
  • Change name on step 1
  • Accept all other defaults

31
Add New JSP (Sample Code)
32
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

33
Build Deploy EJB to EAServer
  • Select Rebuild
  • Select Deploy Options
  • Select Deploy

34
Build Deploy Web Module to EAServer
  • Select Rebuild
  • Select Deploy Options
  • Select Deploy

35
Course Overview
  • Assumptions
  • EAServer Structure
  • JBuilder to ASA Connection
  • Creating the JBuilder Project
  • Creating the EJB
  • Creating the Web Application Client (WAR)
  • Build Deploy
  • Run Application

36
Run Application
  • Open a web browser
  • Go to the application URL
  • http//mymachinename8080/myWebModule/myjsp.jsp

37
Demo Survey Application
38
Questions
Write a Comment
User Comments (0)
About PowerShow.com