ๆญฏWriting_Enterprise_Applications_2_JunoYoon.PDF

Similar documents
ๆญฏWriting_Enterprise_Applications_7_JunoYoon.PDF

rmi_๋ฐ•์ค€์šฉ_final.PDF

๊ต์œก2 ? ๊ทธ๋ฆผ

Intro to Servlet, EJB, JSP, WS

MasoJava4_Dongbin.PDF

Interstage5 SOAP์„œ๋น„์Šค ์„ค์ • ๊ฐ€์ด๋“œ

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_fโ€ฆ

๋ชฉ์ฐจ JEUS EJB Session Bean๊ฐ€์ด๋“œ stateful session bean stateful sample ๊ฐ€์ด๋“œ sample source ๊ฒฐ๊ณผํ™•์ธ http session์—

JMF3_์‹ฌ๋นˆ๊ตฌ.PDF

JavaGeneralProgramming.PDF

JMF2_์‹ฌ๋นˆ๊ตฌ.PDF

Chap12

ORANGE FOR ORACLE V4.0 INSTALLATION GUIDE (Online Upgrade) ORANGE CONFIGURATION ADMIN O

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

No Slide Title

J2EE Concepts

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

1

DocsPin_Korean.pages

01-OOPConcepts(2).PDF

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

์ž๋ฐ”GUI์‹ค์ „ํ”„๋กœ๊ทธ๋ž˜๋ฐ2_์žฅ๋Œ€์›.PDF

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

CD-RW_Advanced.PDF

02 C h a p t e r Java

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

14-Servlet

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

untitled

Interstage4 ์„ค์น˜๊ฐ€์ด๋“œ

Dialog Box ์‹คํ–‰ํŒŒ์ผ์„ Web์— ํฌํ•จ์‹œํ‚ค๋Š” ๋ฐฉ๋ฒ•

( )๋ถ€๋ก

KYO_SCCD.PDF

10.ppt

Microsoft Word - Enterprise Java Beans.doc

12-file.key

09-interface.key

แ„‰แ…ตแ†ซแ„…แ…ตแ†ทแ„‘แ…ณแ„…แ…ฉแ„€แ…ณแ„…แ…ขแ„†แ…ฅ_แ„แ…ณแ†ฏแ„…แ…ตแ†ซแ„แ…ฉแ„ƒแ…ณ.key

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Spring Data JPA Many To Many ์–‘๋ฐฉํ–ฅ ๊ด€๊ณ„ ์˜ˆ์ œ

Network Programming

Spring Boot/JDBC JdbcTemplate/CRUD ์˜ˆ์ œ

Microsoft PowerPoint - RMI.ppt

NoSQL

ch09

C# Programming Guide - Types

Remote UI Guide

FileMaker 15 ODBC ๋ฐ JDBC ์„ค๋ช…์„œ

J2EE & Web Services iSeminar

FileMaker ODBC ๋ฐ JDBC ๊ฐ€์ด๋“œ

Chap7.PDF

thesis

05-class.key

Social Network

ilist.add(new Integer(1))๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ilist.add(1)๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•œ ๊ฒƒ์€ ์ž๋ฐ” 5.0์— ์ถ”๊ฐ€๋œ ๊ธฐ๋ณธ ์ž๋ฃŒํ˜•๊ณผ ํ•ด๋‹น ๊ฐ์ฒด ์ž๋ฃŒ ํ˜•๊ณผ์˜ ์˜คํ† ๋ฐ•์‹ฑ/์–ธ๋ฐ•์‹ฑ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•œ ๊ฒƒ์œผ๋กœ ์˜คํ† ๋ฐ•์‹ฑ์ด๋ž€ ์ž๋ฐ” ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ ๊ฐ์ฒด๋ฅผ ์š”๊ตฌํ•˜๋Š” ๊ณณ์— ๊ธฐ๋ณธ ์ž๋ฃŒํ˜•

PWR PWR HDD HDD USB USB Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl Cable PC PC DDNS (

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

FDยพร˜ร…รร‡รยถรณร€รŒรรฎ(ร€รฅยนร™ยฒรž)-ร€ร›ยพรทรรŸ

ETL_project_best_practice1.ppt

Something that can be seen, touched or otherwise sensed

MPLAB C18 C

ๆญฏJavaExceptionHandling.PDF

Java ~ Java program: main() class classยป public static void main(string args[])ยป First.java (main class ) /* The first simple program */ public class

Portal_9iAS.ppt [์ฝ๊ธฐ ์ „์šฉ]

์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ ADO 21์ผ ์™„์„ฑ

04์žฅ

chapter1,2.doc

Modern Javascript

PCServerMgmt7

Orcad Capture 9.x

PowerPoint ํ”„๋ ˆ์  ํ…Œ์ด์…˜

Service-Oriented Architecture Copyright Tmax Soft 2005

์ž๋ฐ” ํ”„๋กœ๊ทธ๋ž˜๋ฐ


Index Process Specification Data Dictionary

chapter4

13์ฃผ-14์ฃผproc.PDF

MySQL-Ch05

07 แ„Œแ…กแ„‡แ…กแ„‹แ…ด แ„ƒแ…กแ„‹แ…ฃแ†ผแ„’แ…กแ†ซ แ„แ…ณแ†ฏแ„…แ…ขแ„‰แ…ณ.key

No Slide Title

5แ„Œแ…กแ†ผ.key

FileMaker ODBC and JDBC Guide

Corporate PPT Template

์–ด๋Œ‘ํ„ฐ๋ทฐ

UML

USB USB DV25 DV25 REC SRN-475S REC SRN-475S LAN POWER LAN POWER Quick Network Setup Guide xdsl/cable Modem PC DVR 1~3 1.. DVR DVR IP xdsl Cable xdsl C

intro


untitled

2015 ๊ฒฝ์ œใ†์žฌ์ •์ˆ˜์ฒฉ

์ดˆ๋ณด์ž๋ฅผ ์œ„ํ•œ ์ž๋ฐ” 2 21์ผ ์™„์„ฑ - ์ตœ์‹ ๊ฐœ์ •ํŒ

APOGEE Insight_KR_Base_3P11

MS-SQL SERVER ๋Œ€๋น„ ๊ธฐ๋Šฅ

3 S Q L A n t i p a t t e r n s Trees/intro/parent.sql CREATE TABLE Comments ( comment_id SERIAL PRIMARY KEY, parent_id BIGINT UNSIGNED, comment TEXT

thesis

Spring Boot

ODS-FM1

SMB_ICMP_UDP(huichang).PDF

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

Transcription:

<JSTORM> Writing Enterprise Applications with Java 2 Platform, Enterprise Edition - part2 JSTORM http//wwwjstormpekr

Revision <10> <2001/04/16> Document Information Document title Writing Enterprise Applications with Java 2 Platform, Enterprise Edition - part2 Document file name Revision number <10> Issued by Issue Date <2001/04/16> Status Writing_Enterprise_Applications_2_JunoYoon < > junoyoon@orgionet final Content Information Audience Abstract Reference Benchmark information J2EE Entity EJB - Writing Enterprise Applications with JavaTM Platform, Enterprise Edition By Monica Pawlan (http//developerjavasuncom/developer/online Training/J2EE/Intro/) JSTORM <2/2>

Revision <10> <2001/04/16> Table of Contents Lesson 2 Entity Bean 4 Entity Bean 4 8 10 11 11 J2EE 18 JSTORM <3/3>

Revision <10> <2001/04/16> Entity Bean, Lesson 1 BonusServlet Entity Bean, ID Lesson 1, 5 J2EE SDK Cloudscape Entity Bean, SQL JDBC SQL Entity Bean Entity Bean, Entity Bean Entity Bean, SQL JDBC Entity Bean Entity Bean, Entity Bean, Commit JSTORM <4/4>

Revision <10> <2001/04/16> BonusHome Session Bean CalcHome Entity Bean BonusHome, findbyprimarykey ID ID create BonusServlet create, BonusBean ejbcreate BonusHomecreate BonusBeanejbCreate Entity Bean Entity Bean (ID ), javarmiremoteexception BonusServlet package Beans; import javarmiremoteexception; import javaxejbcreateexception; import javaxejbfinderexception; import javaxejbejbhome; public interface BonusHome extends EJBHome { public Bonus create(double bonus, String socsec) throws CreateException, RemoteException; public Bonus findbyprimarykey(string socsec) throws FinderException, RemoteException; Bonus, Create, Entity Bean Bonus Entity Bean getbonus getsocsec package Beans; import javaxejbejbobject; import javarmiremoteexception; public interface Bonus extends EJBObject { public double getbonus() throws RemoteException; public String getsocsec() throws RemoteException; JSTORM <5/5>

Revision <10> <2001/04/16> BonusBean BonusBean Entity Bea n(cmp), Entity Bean, Entity Bean, BonusBean Bean Writing Advanced Applications 3 developerjavasuncom/developer/onlinetraining/programming/jdcbook Java 2 Enterprise Edition Developer's Guide 4 javasuncom/j2ee/j2sdkee/techdocs/guides/ejb/html/devguidetochtml BonusServlet BonusHomecreate, BonusBeansetEntityCotext setentitycontext EntityContext Bean Next ejbcreate ejbcreate Bean ejbpostcreate ejbcreate Next Bean JSTORM <6/6>

Revision <10> <2001/04/16> Bean Bean Bean Bean, Bean ejbpassivate ejbactivate, Bean /, ejbremove, remove, ejbload ejbstore, Bean getbonus getsocsec, set<type> ( ), Bean,, package Beans; import javarmiremoteexception; import javaxejbcreateexception; import javaxejbentitybean; import javaxejbentitycontext; public class BonusBean implements EntityBean { public double bonus; public String socsec; private EntityContext ctx; public double getbonus() { return thisbonus; public String getsocsec() { return thissocsec; public String ejbcreate(double bonus, String socsec) throws CreateException{ //Called by container after setentitycontext thissocsec=socsec; thisbonus=bonus; return null; JSTORM <7/7>

Revision <10> <2001/04/16> public void ejbpostcreate(double bonus, String socsec) { //Called by container after ejbcreate //These next methods are callback methods that //are called by the container to notify the //Bean some event is about to occur public void ejbactivate() { //Called by container before Bean //swapped into memory public void ejbpassivate() { //Called by container before //Bean swapped into storage public void ejbremove() throws RemoteException { //Called by container before //data removed from database public void ejbload() { //Called by container to //refresh Entity Bean's state public void ejbstore() { //Called by container to save //Bean's state to database public void setentitycontext(entitycontext ctx){ //Called by container to set Bean context public void unsetentitycontext(){ //Called by container to unset Bean context Lesson 1 BonusServlet init doget init Session Bean CalcBean Entity Bean BonusBean public class BonusServletextends HttpServlet { CalcHome homecalc; BonusHome homebonus; Bonus thebonus, record; public void init(servletconfig config) throws ServletException{ try { JSTORM <8/8>

Revision <10> <2001/04/16> InitialContext ctx = new InitialContext(); Object objref = ctxlookup("bonus"); Object objref2 = ctxlookup("calcs"); homebonus= (BonusHome) PortableRemoteObjectnarrow( objref, BonusHomeclass); homecalc=(calchome) PortableRemoteObjectnarrow( objref2, CalcHomeclass); catch (Exception NamingException) { NamingExceptionprintStackTrace(); doget try CalcBean BonusBean calcbonus, Entity Bean, BonusHomecreate BonusHomefindByPrimaryKey (ID ) Next,,, HTML catch (ID ), ID Entity Bean,,, HTML try { Calc thecalculation; //Retrieve Bonus and Social Security Information String strmult = requestgetparameter( "MULTIPLIER"); //Calculate bonus Integer integermult = new Integer(strMult); multiplier = integermultintvalue(); socsec = requestgetparameter("socsec"); //Calculate bonus double bonus = 10000; thecalculation = homecalccreate(); calc = thecalculationcalcbonus(multiplier, bonus); //Create row in table thebonus = homebonuscreate(calc, socsec); record = homebonusfindbyprimarykey(socsec); //Display data JSTORM <9/9>

Revision <10> <2001/04/16> outprintln("<h1>bonus Calculation</H1>"); outprintln("<p>soc Sec passed in " + thebonusgetsocsec() + "<P>"); outprintln("<p>multiplier passed in " + multiplier + "<P>"); outprintln("<p>bonus Amount calculated " + thebonusgetbonus() + "<P>"); outprintln("<p>soc Sec retrieved " + recordgetsocsec() + "<P>"); outprintln("<p>bonus Amount retrieved " + recordgetbonus() + "<P>"); outprintln("</body></html>"); //Catch duplicate key error catch (javaxejbduplicatekeyexception e) { String message = egetmessage(); //Display data outprintln("<h1>bonus Calculation</H1>"); outprintln("<p>soc Sec passed in " + socsec + "<P>"); outprintln("<p>multiplier passed in " + multiplier + "<P>"); outprintln("<p>bonus Amount calculated " + calc + "<P>"); outprintln("<p>" + message + "<P>"); outprintln("</body></html>"); catch (Exception CreateException) { CreateExceptionprintStackTrace(); Entity Bean, Lesson 1 Entity Bean Unix Windows #! /bin/sh cd /home/monicap/j2ee J2EE_HOME=/home/monicap/J2EE/j2sdkee1 21 CPATH= $J2EE_HOME/lib/j2eejar javac -d -classpath "$CPATH" Beans/BonusBeanjava Beans/BonusHomejava Beans/Bonusjava cd \home \monicap\j2ee set J2EE_HOME=\home \monicap\j2ee\j2sdkee1 21 JSTORM <10/10>

Revision <10> <2001/04/16> set CPATH= ;%J2EE_HOME%\lib\j2eejar javac -d -classpath %CPATH% Beans/BonusBeanjava Beans/BonusHomejava Beans/Bonusjava Unix Windows cd /home/monicap/j2ee/clientcode J2EE_HOME=/home/monicap/J2EE/j2sdkee1 21 CPATH= $J2EE_HOME/lib/j2eejar/home/monicap/J2EE javac -d -classpath "$CPATH" BonusServletjava cd \home \monicap\j2ee\clientcode set J2EE_HOME=\home\monicap\J2EE\j2sdkee1 21 set CPATH= ;%J2EE_HOME%\lib\j2eejar; \home \monicap\j2ee javac -d -classpath %CPATH% BonusServletjava, J2EE,, Cloudscape j2ee -verbose deploytool cloudscape -start, J2EE Unix Windows j2sdkee1 21/bin/j2ee -verbose j2sdkee1 21/bin/deploytool j2sdkee1 21/bin/cloudscape -start j2sdkee1 21\bin\j2ee -verbose j2sdkee1 21\bin\deploytool j2sdkee1 21\bin\cloudscape -start Entity Bean JSTORM <11/11>

Revision <10> <2001/04/16> WAR (Web Archive), BonusServlet bonushtml BonusServlet, J2EE Local Applicatons Window BonusApp [Tools] [Update Application Files] Lesson BonusApp Entity Bean Entity Bean EJB JAR, Lesson 1 Session Bean, Lesson 1, Entity Bean Session Bean JAR Bean JAR [File] [New Enterprise Bean] [Introduction] [Next >] [EJB JAR] [Enterprise Bean will go in field] BonusApp BonusJar [Add] [Add Contents to JAR], Bonusclass [Add] BonusBeanclass [Add] JSTORM <12/12>

Revision <10> <2001/04/16> BonusHomeclass [Add] [OK] [EJB JAR] [Next >] [General] BeansBonusBean BeansBonusHome BeansBonus BonusBean [Entity] [Next >] [Entity Settings] [Container-Managed persistence]( ) bonus socsec javalangstring JSTORM <13/13>

Revision <10> <2001/04/16> Primitive Type (ex int, float, char ) primary key field socsec [Next >] [Environment Entries] [Next >] Entity Bean ( ) [Enterprise Bean References] [Next >] Entity Bean Bean [Resource References] [Next >] Entity Bean, JavaMail Session [Security] [Next >] Entity Bean security roles [Transaction Management] [Container-managed transactions] create, findbyprimarykey, getbonus, getsocsec required Commit,[Enterprise Java B eans Developer's Guide] 6 (javasuncom/j2ee/j2sdkee/te chdocs/guides/ejb/html/devguidetochtml) JSTORM <14/14>

Revision <10> <2001/04/16> [Next >] [Finish] Local Applications BonusApp [JNDI names] BonusBean JNDI bonus J2EE, Entity Bean SQL Local Applications BonusBean Inspecting window [Entity] [Deployment Settings] JSTORM <15/15>

Revision <10> <2001/04/16> [Deployment Settings] [Database JNDI name] jdbc/cloudscape [Create table on deploy] [Delete table on Undeploy] [Generate SQL now], SQL EJB findbyprimary Key, SQL SEL ECT "socsec" FROM "BonusBeanTable" WHERE "socsec"=? (? ) findbyprimarykey [OK] JSTORM <16/16>

Revision <10> <2001/04/16> J2EE Verify Deploy Verify BonusEar [Tool] [Verifier] [OK], Verifier Version 12, tests appweburi, [Tool] [Deploy Application] [Return Client Jar],, HT ML, JAR [Next >] CalcBean [JNDI names] calcs BonusBean [JND I names] bonus [Next >] BonusRoot [Next >] [Finish], [OK] JSTORM <17/17>

Revision <10> <2001/04/16> J2EE Web, 8000 bonushtml http//localhost8000/bonusroot/bonushtml social security number multiplier Submit BonusServlet, HTML Bonus Calculation Soc Sec passed in 777777777 Multiplier passed in 25 Bonus Amount calculated 25000 Soc Sec retrieved 7777777777 Bonus Amount retrieved 25000 bonushtml, social security number multiplier 2, Bonus Calculation Soc Sec passed in 777777777 Multiplier passed in 2 Bonus Amount calculated 2000 Duplicate primary key JSTORM <18/18>