JEUS Client Application Copyright 2004 Tmax Soft Co.Ltd. All Rights Reserved.

Similar documents
Interstage5 SOAP서비스 설정 가이드

교육2 ? 그림

rmi_박준용_final.PDF

untitled

02 C h a p t e r Java

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Intro to Servlet, EJB, JSP, WS

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

목차 JEUS EJB Session Bean가이드 stateful session bean stateful sample 가이드 sample source 결과확인 http session에

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

Microsoft Word - AnyLink Introduction v3.2.3.doc

Chap12

Dialog Box 실행파일을 Web에 포함시키는 방법

Chap7.PDF

chapter1,2.doc

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

MasoJava4_Dongbin.PDF

PowerPoint 프레젠테이션

Interstage4 설치가이드

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D D382E687770>

歯Writing_Enterprise_Applications_2_JunoYoon.PDF

PowerPoint 프레젠테이션

DocsPin_Korean.pages

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

PCServerMgmt7

thesis

J2EE Concepts

자바-11장N'1-502

No Slide Title

Microsoft PowerPoint - 04-UDP Programming.ppt

JavaGeneralProgramming.PDF

No Slide Title

Remote UI Guide

ODS-FM1

목차 JEUS JNLP Client Sample 가이드 JNLP 란 JNLP의이점 TEST TEST 환경 TEST Sample sample application 셋팅 (ser

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 (

개요오라클과티베로에서 JDBC 를통해접속한세션을구분할수있도록 JDBC 접속시 ConnectionProperties 를통해구분자를넣어줄수있다. 하나의 Node 에다수의 WAS 가있을경우 DB 에서 Session Kill 등의동작수행시원하는 Session 을선택할수있다.

FileMaker 15 ODBC 및 JDBC 설명서

J2EE & Web Services iSeminar

10X56_NWG_KOR.indd

thesis

PowerPoint 프레젠테이션

uFOCS

FileMaker ODBC 및 JDBC 가이드

Orcad Capture 9.x

1217 WebTrafMon II

User's Guide Manual

1

KYO_SCCD.PDF

untitled

untitled

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

untitled

Apache2 + Tomcat 5 + JK2 를 사용한 로드밸런싱과 세션 복제 클러스터링 사이트 구축

PowerPoint 프레젠테이션

12-file.key

untitled

PowerPoint 프레젠테이션

Copyright 2004 Tmax Soft Co., Ltd. All Rights Reserved. JEUS

final_thesis

Corporate PPT Template

PowerPoint 프레젠테이션

초보자를 위한 ADO 21일 완성

untitled

05-class.key

소개 TeraStation 을 구입해 주셔서 감사합니다! 이 사용 설명서는 TeraStation 구성 정보를 제공합니다. 제품은 계속 업데이트되므로, 이 설명서의 이미지 및 텍스트는 사용자가 보유 중인 TeraStation 에 표시 된 이미지 및 텍스트와 약간 다를 수

APOGEE Insight_KR_Base_3P11

Sena Device Server Serial/IP TM Version

09-interface.key


초보자를 위한 C# 21일 완성

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

자바GUI실전프로그래밍2_장대원.PDF

Deok9_Exploit Technique

01-OOPConcepts(2).PDF

인디쓔피-IOM핸돜벁닄큐1014pdf, page Preflight ( IOM핸돜벁닄큐__1014 )


PowerPoint 프레젠테이션

Network Programming

Solaris Express Developer Edition

9장.key

Service-Oriented Architecture Copyright Tmax Soft 2005

BSC Discussion 1

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

07 자바의 다양한 클래스.key

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

JEUS

Microsoft PowerPoint - Smart CRM v4.0_TM 소개_ pptx

13주-14주proc.PDF

( )부록

JEUS

6강.hwp

블로그_별책부록

6주차.key

초보자를 위한 자바 2 21일 완성 - 최신개정판

PowerPoint 프레젠테이션

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

untitled

04장

Sun Java System Messaging Server 63 64

Transcription:

Client Application Copyright 2004 Tmax Soft CoLtd All Rights Reserved

Copyright Notice Copyright 2004 Tmax Soft Co Ltd All Rights Reserved Tmax Soft Co, Ltd 946-1 18 )135-708 Restricted Rights Legend This software and documents are made available only under the terms of the Tmax Soft License Agreement and may be used or copied only in accordance with the terms of this agreement No part of this document may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, or optical, without the prior written permission of Tmax Soft Co, Ltd TmaxSoft,, TmaxSoft Co,Ltd,,,,, Trademarks Tmax, WebtoB, WebT, and are registered trademarks of Tmax Soft Co, Ltd All other product names may be trademarks of the respective companies with which they are associated Tmax, WebtoB, WebT, TmaxSoft Co,Ltd Document info Document name: Client Application Document date: 2004-05-20 Manual release version: 2 Software Version: 42

ClientApplication 1 17 2 Application Client 19 221 19 222 19 223 20 224 J2EE Deployment Descriptor 21 225 Deployment Descriptor 21 226 22 227 22 231 22 232 module 23 233 JManager module 23 234 26 241 26 242 Deployment Descriptor 26 243 JManager Module deploy 28 244 32 251 Console 32 252 33 Tmax Soft 3

ClientApplication 3 Applet Client 35 321 35 322 Applet Client 35 323 HTML 36 324 37 331 37 332 Servlet Context 37 333 Servlet Context 37 334 38 341 38 342 web browser 38 343 appletviewer 38 344 39 4 JNLP 41 421 41 422 JNLPMainxml 41 423 JNLP 42 424 42 431 42 432 Mainxml 42 4 Tmax Soft

ClientApplication 433 43 441 43 442 JNLP Application 43 443 44 451 44 452 JNLP 44 453 44 461 45 462 client_home resource 45 463 45 464 JManager Tool 46 465 47 471 47 472 Java Web Start 47 473 47 481 48 482 Web Browser 48 483 49 491 50 492 50 493 JNLP File 51 494 51 Tmax Soft 5

ClientApplication 495 52 496 JNLP 53 497 Updating the Application 54 498 55 5 CAS 57 521 57 522 58 523 58 524 59 531 59 532 59 533 61 534 61 541 61 542 COMAccount EJB 61 543 EJB 62 544 64 551 64 552 VC++ 65 553 Visual Basic 67 554 ASP 68 555 69 6 Tmax Soft

ClientApplication 6 -COM Connector (J2COM) 71 621 71 622 71 623 Service Category 72 631 74 632 74 633 74 641 COM Registration/Unregistration 76 642 Java Client (Local Invocation) 76 643 Java Client (Remote Invocation) 79 651 80 652 Local Invocation (A) 80 653 Local Invocation (B) 84 654 Remote Invocation 86 7 93 A jeus-client-dd: Application Client Deployment Descriptor 95 B JNLPMainxml: JNLP Resource Reference 105 Tmax Soft 7

ClientApplication 111 8 Tmax Soft

ClientApplication 1 Application/Applet Client 20 2 JManager Create Module 23 3 JManager New Module 24 4 client module file 25 5 J2EE-specific 26 6 JManager Open Module 29 7 JManager Deploy Module 29 8 JManager node 30 9 JManager client module deploy 31 10 JManager deploy 32 11 JManager JNLP 46 12 JNLPMainxml 47 13 browser Web Start 49 14 The JNLP- 49 15 version attribute 52 16 application 52 17 JAR resource path 54 18 JNLP 20 55 19 CAS 57 20 J2EE CAS installer 60 21 COM Bridge 60 22 J2COM 72 23 Local Invocation 73 Tmax Soft 9

ClientApplication 24 Remote Invocation 73 25 MS PowerPoint Slide 86 26 MS Word Document 91 10 Tmax Soft

ClientApplication Client Application JNLP, CAS, J2COM Java application client Applet JNLP client CAS EJB COM client Server EJB J2EE Application client, Applet, JNLP, COM application 1 2 3 Client Application 7 Tmax Soft 11

ClientApplication 1 2 Application Client 3 Applet Client 4 JNLP 5 CAS (COM-to- bridge) 6 -COM Connector (J2COM, Java-to-COM application bridge) 7 2 2 A jeus-client-dd: Application Client Deployment Descriptor B JNLPMainxml: JNLP Resource Reference Server EJB The J2EE 13 Specification The JNLP Specification Web Container, 12, Times New Roman 12 Tmax Soft

ClientApplication Roman public class myclass { } Java <system-config> XML / Configuration _HOME GUI )c:\jeus42 jeusadmin nodename [ ] < xyz > < > )<node name> hostname ) A B: A B?, +, * XML,,,, XML Tmax Soft 13

ClientApplication <<FileNameext>> 1 OS Microsoft Windows, Windows \ / Java, CAS Com Bridge Java Web Start J2EE TM CAS (Client Access Services) COM Application J2EE EJB Java CAS Sun JNLP, Sun 14 Tmax Soft

ClientApplication -COM connector JNLP Java/ application COM application JNLP Java Network Launching Protocol, Tmax Soft 15

ClientApplication Korea Tmax Soft Co, Ltd 18F Glass Tower, 946-1, Daechi-Dong, Kangnam-Gu, Seoul 135-708 South Korea Tel: 82-2-6288-2114 Fax: 82-2-6288-2115 Email: info@tmaxcokr Web (Korean): http://wwwtmaxcokr USA Tmax Soft, Inc 560 Sylvan Ave, Englewood Cliffs NJ 07632 USA Tel: 1-201-567-8266 FAX: 1-201-567-7339 Email: info@tmaxsoftcom Web (English): http://wwwtmaxsoftcom Japan Tmax Soft Japan Co, Ltd 6-7 Sanbancho, Chiyoda-ku, Tokyo 102-0075 Japan Tel: 81-3-5210-9270 FAX: 81-3-5210-9277 Email: info@tmaxsoftcojp Web (Japanese): http://wwwtmaxsoftcojp China Beijing Silver Tower, RM 1507, 2# North Rd Dong San Huan, Chaoyang District, Beijing, China, 100027 Tel: 86-10-6410-6148 Fax: 86-10-6410-6144 E-mail : info@tmaxchinacomcn Web (Chinese): http://wwwtmaxchinacomcn 16 Tmax Soft

ClientApplication 1 Applet, JNLP, CAS JSP EJB, 2, Applet 3 JNLP 4 VC++, ASP, Visual Basic CAS 5 Tmax Soft 17

ClientApplication 18 Tmax Soft

ClientApplication 2 Application Client 21 XML Deploy Client Container Naming Service, Scheduler, Security 22 Application Client 221 client-server 222 JVM main(), J2EE Client Container Client Container J2EE Container [ 1] Tmax Soft 19

ClientApplication Applet client module JNDI Server Applet Container Scheduler Security server module JNDI EJB EJB EJB Application client module JNDI Scheduler Security Transaction Client Container Scheduler Security Connection Pool 1 Application/Applet Client Client Container Client Container Client Module Server Module (JNDI, Scheduler, Security) JNDI (EJB) Client Container 223 Client application public main Salary EJB lookup package SimpleBean; <<SalaryClientjava>> import javaxejb*; import SimpleBean*; import javaxnaminginitialcontext; import javasql*; public class SalaryClient { public static void main(string[] args) 20 Tmax Soft

ClientApplication { try { InitialContext ctx = new InitialContext(); SalaryHome home = (SalaryHome)ctxlookup("Salary"); Salary bean = homecreate(); } } Systemoutprintln("Monthly net salary: " + beancalculatesalary(30000, 28, 31000)); } catch (javaxnamingnamingexception ne) { Systemoutprintln("Naming Exception caught: " + ne); } catch (javaxejbcreateexception ce) { Systemoutprintln("Create Exception caught: " + ce); } catch (javarmiremoteexception re) { Systemoutprintln("Remote Exception caught: " + re); } 224 J2EE Deployment Descriptor J2EE Deployment Descriptor, vender J2EE 225 Deployment Descriptor client, Deplyment Descriptor( DD ) XML Client Container, SalaryClient client XML Tmax Soft 21

ClientApplication <<jeus-client-ddxml>> <?xml version="10"?> <!DOCTYPE jeus-client-dd PUBLIC "-//Sun Microsystems, Inc//DTD Application Client 40//EN" "http://wwwtmaxsoftcom/jeus/dtd/40/jeus-client-dddtd"> <jeus-client-dd> <scheduler>false</scheduler> <module-info> <module-name>client_module</module-name> <app-main-class>simplebeansalaryclient</app-main-class> </module-info> </jeus-client-dd> : A 226 CLIENT_HOME\: Deploy 227 Client Container package, deploy 23 Application Client Module 231 1 DD XML, jar 2, JManager tool ( ) : Client deployment descriptor JManager tool 22 Tmax Soft

ClientApplication 232 module 1 class application-clientxml 2 console jar : jar cvf product-clientjar ** 233 JManager module JMananger client application 1 JManager 2 Drop-down list Deploy 3 Create Module [ 2] 2 JManager Create Module 4 Module Type Client Module Tmax Soft 23

ClientApplication 5 Jar path [ 3] 3 JManager New Module 6 Next >> 7 Client application [ 4] 24 Tmax Soft

ClientApplication 8 Next >> 4 client module file 9 applicaton-clientxml [ 5] Tmax Soft 25

ClientApplication 234 5 J2EE-specific 10 Finish deploy 24 Application Client Module deploy 241 26 Tmax Soft Application JManager deploy jeusclient-ddxml 242 Deployment Descriptor client application deploy jeus-client-ddxml Jmanager Deploy XML module info sub-elemenet o module name

ClientApplication o application main class (package ) o application arguments: main system log : element o target: stdout file o file name: file o buffer size o log level: fatal, notice, information debug security info : element o provider node name: Security Server IP o user name o password: scheduler switch: Client JVM Scheduler Server application-clientxml reference export-name : <<jeus-client-ddxml>> <jeus-client-dd> <module-info> <module-name>client_application1</module-name> <app-main-class>simplebeansalaryclient</app-main-class> <app-argument>125000</app-argument> </module-info> <system-log> <target>stdout</target> <file-name>c:\log\client</file-name> Tmax Soft 27

ClientApplication 28 Tmax Soft <buffer-size>1024</buffer-size> <level>information</level> </system-log> <security-info> <provider-node-name>kylax</provider-node-name> <user>sungho</user> <password>mtexmtexmq==</password> </security-info> <scheduler>true</scheduler> <env> </env> <name>year</name> <type>javalanginteger</type> <value>2002</value> <ejb-ref> <jndi-info> <ref-name>count</ref-name> <export-name>count_bean</export-name> </jndi-info> </ejb-ref> <res-ref> <jndi-info> <ref-name>datasource</ref-name> <export-name>oracle_datasource</export-name> </jndi-info> </res-ref> <res-env-ref> <jndi-info> <ref-name>jms/salaryinfo</ref-name> <export-name>jms/salary_info_queue1</export-name> </jndi-info> </res-env-ref> </jeus-client-dd> 243 JManager Module deploy Client module deploy 1 JManager 2 [ 6] Open Module

ClientApplication : JManager deploy, step3 6 JManager Open Module 3 deploy Deploy Module [ 7] 7 JManager Deploy Module 4 [ 8] node client module deploy JNLP Export client module JNLP client 4 Tmax Soft 29

ClientApplication 8 JManager node 5 Next >> 6 DD (jeus-client-ddxml) [ 9] A 30 Tmax Soft

ClientApplication 9 JManager client module deploy 7 Next >> 8 deploy Yes [ 10] Tmax Soft 31

ClientApplication 10 JManager deploy 244 deploy JManager JManager 25 Application Client Module 251 Console 1 EJB deploy EJB EJB Salary 2 XML JAR 3 _HOME\webhome\client_home clientcontainerjar ( classpath ) 32 Tmax Soft

ClientApplication 4 console java - classpath %CLIENT_HOME%\clientcontainerjar;%CLIENT_HOME%\c lient_module\client_modulejar;%ejb_home%\client_jar jeusserverclientcontainerclientcontainer 5 permission, JDK_HOME\jre\lib\security javapolicy, -Djavasecuritypolicy=javapolicy 6 [ErrorMsgManager] Message Manager is initialized [20041217 16:30:41] [ClientContainer] configuration information is found from [D:\jeus\4\webhome\client_home\client_module\jeus-cl ient-ddxml] [20041217 16:30:41] [ClientContainer] Logger is started [20041217 16:30:41] [TMLinkManager] accept thread is started [20041217 16:30:41] [TMClient] TMClient initailized [20041217 16:30:41] [ClientContainer] client container is started [20041217 16:30:41] [ClientContainer] starting client application [SimpleBeanSalaryClient:] Monthly net salary: XXXX [20041217 16:30:41] [ClientContainer] client container is down XXXX Salary EJB : EJB deploy 252 client application main, client container classpath client application client application Tmax Soft 33

ClientApplication 26 Client/Server Test/Debuging A DD 34 Tmax Soft

ClientApplication 3 Applet Client 31 Applet,, Applet,, Applet Applet 32 Applet Client 321 _HOME\samples\clientcontainer\ 322 Applet Client Applet Applet, start() Applet package SimpleBean; <<SalaryAppletClientjava>> import javaxejb*; import javasql*; import javaxsql*; import javautil*; import javaapplet*; import javaxnaming*; public class SalaryAppletClient extends Applet Tmax Soft 35

ClientApplication { public void start() { try { InitialContext ctx = new InitialContext(); SalaryHome home = (SalaryHome)ctxlookup("Salary"); Salary bean = homecreate(); } } Systemoutprintln("Monthly net salary: " + beancalculatesalary(28000, 2, 500)); } catch (javaxnamingnamingexception ne) { Systemoutprintln("Naming Exception caught: " + ne); } catch (javaxejbcreateexception ce) { Systemoutprintln("Create Exception caught: " + ce); } catch (javarmiremoteexception re) { Systemoutprintln("Remote Exception caught: " + re); } 323 HTML <<Salaryhtml>> <html> <body> <applet codebase = "" archive="jnlpcontainerjar,simplejar,simplebeanjar,simpleclient jar,simpleclient2jar" code = "SimpleBeanSalaryAppletClient" width = 300 height = 300> </applet> </body> </html> : JDK htmlconverter HTML http://javasuncom/products/plugin/13/docs/htmlconv_01html#using_command 36 Tmax Soft

ClientApplication 324 applet 33 Applet Client deploy 331 Applet deploy 332 Servlet Context HTML, Servlet Context default Context (SERVLET_HOME\webapps) : default Context applet http://localhost:8080/applet/ 333 Servlet Context <applet> HTML EJB Home Remote Applet jnlpcontainerjar (CLEINT_HOME ) : Home remote applet codebase 2: base port 9736 base port, JAR META-INF jeusproperties ( base port, JAR jeusproperties default 9736 ) jeusbaseport=<non-default base port> Tmax Soft 37

ClientApplication : jeusbaseport=9222 JDK 13x _HOME\lib\system jaasjar HTML applet jassjar archive JDK13x jassjar JDK14x default JDK 13x jassjar Applet codebase 334 Applet Deploy Applet J2EE, Applet J2EE, Deploy 34 Applet Client 341 Applet Appletviewer web browser URL Web browser appletviewer URL http://localhost:8080/applet/salaryhtml 342 web browser Web browser HTML applet 343 appletviewer appletviewer JDK, JDK bin : appletviewer -J -Djavanamingfactoryinitial=jeusjndi ContextFactory Salaryhtml 38 Tmax Soft

ClientApplication 344 Applet Applet 35 Applet, Tmax Soft 39

ClientApplication 40 Tmax Soft

ClientApplication 4 JNLP 41 JNLP Java Network Launching Protocol JNLP J2EE JNLP,, Web JNLP, : URL http://javasuncom/products/javawebstart/ : JNLP, JNLP 42 JNLP 421 JNLP 422 JNLPMainxml JNLPMainxml JNLP client Tmax Soft 41

ClientApplication XML B 423 JNLP 424 _HOME\config\<Node-Name>\JNLPServer: JNLPMainxml CLIENT_HOME: JNLP JNLP Sun JNLP JNLPMainxml jar JNLP JNLP 43 JNLP 431 JNLP Mainxml 432 Mainxml JNLP JNLP Mainxml JNLP <<Mainxml>> <jeus-system> <node> <enable-jnlp>true</enable-jnlp> </node> </jeus-system> : JNLP 9744(_BASEPORT+8) 42 Tmax Soft

ClientApplication 433 Mainxml JNLP JNLP JNLP false 44 JNLP Application 441 JNLP JNLP 442 JNLP Application <<HelloJeusjava>> import javaxswing*; import javaawtfont; import javaawtborderlayout; import javaawtevent*; public class HelloJeus { public static void main(string[] args) { new HelloJeusFrame(); } } class HelloJeusFrame extends JFrame { JLabel label = new JLabel( Hello Jeus ); public HelloJeusFrame() { labelsetfont( new Font( Helevetica, FontBOLD,70)); getcontentpane()setlayout( new BorderLayout() ); getcontentpane()add( label, BorderLayoutCENTER); setsize(500,250); setvisible( true ); } } Tmax Soft 43

ClientApplication :, HelloJeusjar 443 JNLP JNLP 45 JNLP 451 JNLP JNLP XML JNLP JNLP JNLP, JNLP 452 JNLP <<HelloJeusjnlp>> <?xml version= 10?> <jnlp codebase= http://localhost:9744/jnlp/hellojeus href= HelloJeusjnlp spec= 10+ > <information> <title>hellojeus Test</title> <vendor>tmax</vendor> <homepage href= http://wwwtmaxcokr /> <description kind= short >Hello Test</description> </information> <resources> <j2se version= 13+ /> <jar href= HelloJeusjar main= true /> </resources> <application-desc main-class= HelloJeus /> </jnlp> HelloJeusjnlp 453 JNLP JNLP JNLP JNLP 44 Tmax Soft

ClientApplication 46 JNLP Application 461 _HOME\config\<node name>\jnlpserver\jnlpmainxml JNLP JManager Tool JNLPMainxml : JNLPServer JNLPMainxml : JNLPMainxml, JManager Tool JNLPMainxml DTD B 462 client_home resource (JAR JNLP ) CLIENT_HOME\<package path> CLIENT_HOME _HOME\webhome\client_home : HelloJeus CLIENT_HOME\HelloJeus, JNLPServer 463 JNLPMainxml <jnlp-resource> <jnlp-resource-config> <jnlp-resource> <<JNLPMainxml>> <rsc-name>hellojeus/hellojeusjar</rsc-name> <os-name/> <arch/> <locale/> <version/> <rsc-path>hellojeus/hellojeusjar</rsc-path> </jnlp-resource> Tmax Soft 45

ClientApplication <jnlp-resource> <rsc-name>hellojeus/hellojeusjnlp</rsc-name> <os-name/> <arch/> <locale/> <version/> <rsc-path>hellojeus/hellojeusjnlp</rsc-path> </jnlp-resource> </jnlp-resource-config> B 464 JManager Tool JManager Tool JNLP 1 Edit Admin Config jnlp resource 2 JNLP 2 [ 11] 11 JManager JNLP 3 JNLPMainxml Save Distribute JNLPMainxml [ 12] 46 Tmax Soft

ClientApplication 12 JNLPMainxml 465 JAR JNLP JNLPMainxml JNLP 47 JNLP Client (Java Web Start) 471 Java Web Start JNLP JNLP JDK14 Java Web Start, JDK 472 Java Web Start Java Web Start URL http://javasuncom/products/javawebstart/ Java Web Start 473 JNLP JNLP Client JNLP Tmax Soft 47

ClientApplication 48 JNLP Service 481 JNLP JNLP JNLP Java Web Start JNLP Java Web Start web browser JNLP 482 Web Browser 1 web browser JNLP URL URL http://localhost:9744/jnlp/hellojeus/hellojeusjnlp 2 Java Web Start [ 13] 48 Tmax Soft

ClientApplication 13 browser Web Start 3 Java Web Start 4 Hello Jeus [ 14] 483 14 The JNLP- JNLP Web JNLP,, JNLP Tmax Soft 49

ClientApplication JNLP URL http://javasuncom/products/javawebstart/demoshtml 49 Application Version 491 JNLP 492 <<HelloJeusjava>> import javaxswing*; import javaawtfont; import javaawtborderlayout; import javaawtevent*; public class HelloJeus { public static void main(string[] args) { new HelloJeusFrame(); } } class HelloJeusFrame extends JFrame { JLabel label = new JLabel( Hello Jeus 10 ); public HelloJeusFrame() { labelsetfont( new Font( Helevetica, FontBOLD,70)); getcontentpane()setlayout( new BorderLayout() ); getcontentpane()add( label, BorderLayoutCENTER); setsize(500,250); setvisible( true ); } } 50 Tmax Soft

ClientApplication : HelloJeus10jar CLIENT_HOME\Update 493 JNLP File JNLP <<HelloJeusjnlp>> <?xml version= 10?> <jnlp codebase="http://localhost:9744/jnlp" spec="10"> <information> <locale>en_us</locale> <title>hellojeus Test</title> <vendor>tmax</vendor> <homepage href="http://wwwtmaxcokr"/> <description kind="short">hello Test</description> </information> <resources> <j2se version="13+"/> <jar href="hellojeusjar" version=10 main="true" /> </resources> <application-desc main-class="hellojeus"/> </jnlp> : CLIENT_HOME HelloJeusjnlp 494 [ 15] Tmax Soft 51

ClientApplication 15 version attribute [ 16] 495 16 application <<HelloJeusjava>> import javaxswing*; import javaawtfont; import javaawtborderlayout; import javaawtevent*; public class HelloJeus { public static void main(string[] args) 52 Tmax Soft

ClientApplication } { } new HelloJeusFrame(); class HelloJeusFrame extends JFrame { } JLabel label = new JLabel( Hello Jeus 20 ); public HelloJeusFrame() { } labelsetfont( new Font( Helevetica, FontBOLD,70)); getcontentpane()setlayout( new BorderLayout() ); getcontentpane()add( label, BorderLayoutCENTER); setsize(500,250); setvisible( true ); : HelloJeus20jar 496 JNLP <<HelloJeusjnlp>> <?xml version="10"?> <jnlp codebase="http://localhost:9744/jnlp" spec="10"> <information> <locale>en_us</locale> <title>hellojeus Test</title> <vendor>tmax</vendor> <homepage href="http://wwwtmaxcokr"/> <description kind="short">hello Test</description> </information> <resources> <j2se version="13+"/> <jar href="hellojeusjar" version=20 main="true" /> </resources> <application-desc main-class="hellojeus"/> </jnlp> : JNLP Tmax Soft 53

ClientApplication 497 Updating the Application version 20 [ 17] 17 JAR resource path : Java Web Start jnlp 20 JNLPMainxml <jnlp-resource-config> <jnlp-resource> <rsc-name>hellojeusjar</rsc-name> <rsc-path>update/hellojeus20jar</rsc-path> <version>20</version> </jnlp-resource> <jnlp-resource> <rsc-name>hellojeusjar</rsc-name> <rsc-path>update/hellojeus10jar</rsc-path> <version>10</version> </jnlp-resource> <jnlp-resource> <rsc-name>updatetestjnlp</rsc-name> <rsc-path>hellojeusjnlp</rsc-path> <version>10</version> 54 Tmax Soft

ClientApplication </jnlp-resource> </jnlp-resource-config> [ 18] 18 JNLP 20 498 JNLP JNLP, 410 JNLP JNLP, JNLP JNLP, Tmax Soft 55

ClientApplication 56 Tmax Soft

ClientApplication 5 CAS 51 J2EE TM CAS (Client Access Services) COM J2EE Enterp rise JavaBeans TM Local Java Libraries COM Client CAS URL http://developerjavasuncom/developer/earlyaccess/j2eecas 52 CAS 521 COM Client EJB Bean COM COM Application Address Space JVM EJB COM- Bridge COM-Bridge JVM EJB -CAS [ 19] Client Process (VC++, VB, ASP) Server -CAS COM-Bridge IDispatch (-servicesdll) JNI JVM Request (RMI/IIOP) EJB Response 19 CAS Tmax Soft 57

ClientApplication 522 Java Service: JVM,, Static, Service Module COM JVM Service Service: Enterprise Service Service Module EJB, 523 _HOME\samples\CAS CAS _HOME \lib\system, DLL CAS Component samples\cas o -services Directory: CAS application jeus-servicesdll Interface o : CAS asp : ASP vb : Visual Basic vc : Visual C++ Classes : Program Comaccount EJB src : EJB Comaccount deploy Java client Java setting : lib\system 58 Tmax Soft

ClientApplication o j2eecas-1_0-ea4-win-combridgeexe: CAS J2EE TM CAS Com-Bridge o jeus-servicesdll: CAS DLL, CAS COM Application Link _HOME\lib\system ( : c:\jeus42\lib\system\jeus-servicesdll) 524 COM EJB CAS CAS J2EE CAS 53 CAS 531 J2EE CAS CAS _HOME\lib\system j2eecas-1_0 : CAS 532 1 j2eecas-1_0-ea4-win-combridgeexe 2 Installer 3 J2EE CAS Directory [ 20] Tmax Soft 59

ClientApplication 20 J2EE CAS installer 4 Next > 5 [ 21] JDK 14 JVM Other, JVM 21 COM Bridge 6 J2EE CAS JDK 60 Tmax Soft

ClientApplication 533 COMBRIDGE_HOME: J2EE CAS C:\j2ee-cas-com-bridge JAVA_HOME: JDK, JDK 14 C:\jdk14 _HOME:, C:\jeus42 : JAVA_HOME _HOME 534 J2EE CAS EJB COM 54 EJB 541 COM EJB EJB ASP, Visual C++ EJB 542 COMAccount EJB Comaccount CAS EJB J2EE CAS COMAccount COM application 1 EJB Server Deploy Account EJB Bean 2 EJB component EJB _HOME\lib\system\jeusjar Stub JAR classpath 3 Naming COMAccount EJB Home Interface Look up Tmax Soft 61

ClientApplication 4 Account EJB findall method findbyprimarykey method 543 EJB 1 J2EE CAS COMBRIDGE_HOME JAVA_HOME, EJB _HOME C:\>set COMBRIDGE_HOME=C:\j2ee-cas-com-bridge C:\>set JAVA_HOME=C:\jdk14 C:\>set _HOME=c:\jeus42 2 example\setting createcomaccounttypelibsbat COMAccount Java Type Library gentypelibexe, Typelib C:\j2ee-cas-com-bridge\doc\guide\examples\typelib>dir 2001-10-12 12:41p <DIR> 2001-10-12 12:41p <DIR> 2001-10-12 01:21p 7,520 comaccount_accounttlb 2001-10-12 01:21p 5,740 comaccount_accounthometlb 2001-10-12 01:21p 5,112 java_util_collectiontlb 2001-10-12 01:21p 2,312 java_util_iteratortlb 3 samples\cas\examples\src\bean\comaccont createsql, insertsql DB COM Account Example COM Account Data c reatesql Account Table SQL, inse rtsql file Table Data Insert SQL C:\jeus42\samples\CAS\examples\src\bean\comaccount>type createsql drop table comaccount; create table comaccount (comaccount_id varchar(3) constraint pk_comaccount primary key, first_name varchar(24), 62 Tmax Soft

ClientApplication last_name varchar(24), type varchar(24), balance double precision, credit_limit double precision); exit; 4 EJB COMAccount EJB bean samples \CAS\examples\classes samples\cas\examples\src COM Account Bean Java EJB Bean deploy AccountClientclass : COMAccountEJB deploy EJB c:\jeus42\samples\cas\examples\classes>java - classpath ;c:\jeus42\lib\system\jeusjar;c:\jeus42\client\comac count2jar - Djavanamingfactoryinitial=jeusjndiJNSContextFactory - Djavasecuritypolicy= c:\jeus42\samples\cas\examples \src\client\comaccount\policy comaccountaccountclient [ErrorMsgManager] Message Manager is initialized [20011013 12:12:39] [JNSLocal_] Try to connect to 127001:9738 [20011013 12:12:39] [JNSLocal_] Connected to JNSServer 127001:9738 [20011013 12:12:39] [JNSLocal_] Successfully started (ID 127001:1478) lookup done Account ID: 100 Account Type: Checking First Name: Phil Last Name: Smith Balance: 12300 Credit Limit: 00 Account ID: 555 Account Type: Credit Card First Name: Sally Last Name: Smith Balance: 330 Credit Limit: 10000 Tmax Soft 63

ClientApplication Account ID: 490 Account Type: Savings First Name: Rupert Last Name: Smith Balance: 330000 Credit Limit: 00 Account ID: 296 Account Type: Money Market First Name: Jose Last Name: De Anza Balance: 12000 Credit Limit: 00 Account ID: 807 Account Type: Checking First Name: Lee Last Name: Addison Balance: 100 Credit Limit: 00 print done 5 CAS CAS DLL DLL jeus-servicesdll c:\jeus42\lib\system>regsvr32 jeus-servicesdll 544 EJB COMAccount COM COM EJB deploy 55 CAS 551 COM CAS API J2EE CAS JVM control, classpath, Naming lookup J2EE CAS J2EE CAS 64 Tmax Soft

ClientApplication CAS Visual C++, Visual Basic, COM ASP 552 VC++ COM-Bridge jvm-controldll ( : C:\j2ee-cas-com-bridge\bi n\jvm-controldll ) jeus-servicedll, gentypelibexe typelib file Comaccount_AccountHometlb include void Initialize(void) { /* Initialize the JVM */ IJvmControlPtr jvmctl( uuidof(jvmcontrol)); jvmctl->put_classpath( L"%_HOME%\\lib\\system\\jeusjar;%_HOME%\\webhome\\ ejb_home"); /* When system classpath is not set jvmctl->put_classpath( L"C:\\\\ lib\\system\\jeusjar;c:\\\\webhome\\ejb_h ome"); */ jvmctl->startjvm(); /* Create an enterprise services object for EJB access */ CreateInstance( uuidof(services)); ->put_providerurl(l"localhost"); } /* Retrieve reference to EJB home interface using enterprise services */ accthome = ->LookupEjbHome(L"MyComAccount", L"comaccountAccountHome"); ->LookupEjbHome(L"MyComaccount", L"comaccountAccountHome") export-name MyComAccount comaccountaccouthome lookup Tmax Soft 65

ClientApplication examples\vc VC++ (Examples6dsw) C:\jeus42\samples\CAS\examples\vc>Debug\example6 [ErrorMsgManager] Message Manager is initialized [20011013 12:45:37] [JNSLocal_] Try to connect to localhost:9738 [20011013 12:45:38] [JNSLocal_] Connected to JNSServer localhost:9738 [20011013 12:45:38] [JNSLocal_] Successfully started (ID 127001:1556) Account ID: 100 Account Type: Checking First Name: Phil Last Name: Smith Balance: 1230 Credit Limit: 0 Account ID: 555 Account Type: Credit Card First Name: Sally Last Name: Smith Balance: 33 Credit Limit: 1000 Account ID: 490 Account Type: Savings First Name: Rupert Last Name: Smith Balance: 33000 Credit Limit: 0 Account ID: 296 Account Type: Money Market First Name: Jose Last Name: De Anza Balance: 1200 Credit Limit: 0 66 Tmax Soft Account ID: 807

ClientApplication 553 Visual Basic Account Type: Checking First Name: Lee Last Name: Addison Balance: 10 Credit Limit: 0 Visual Basic -CAS Type Library jvm-controldll jeus-servicesdll Visual Basic EJBHome look up 'Initialize the JVM Dim JvmCtl As New JvmControl 'when system classpath is not set JvmCtlClasspath = "c:\jeus42\lib\system\jeusjar;c:\jeus42\webhome\ejb_home" 'JvmCtlClasspath = "%_HOME%\lib\system\jeusjar;%_HOME%\webhome\ejb_home" JvmCtlStartJvm 'Create an enterprise services object for EJB access Set = New Services ProviderURL = "localhost" 'Retrieve reference to EJB home interface using enterprise services Set AcctHome = LookupEjbHome("MyComAccount", "comaccountaccounthome") LookupEjbHome("MyComaccount", "ComaccountAccountHome") commaccountaccounthome Export MyComaccount EJB bean examples\vb project file(example6vbp) Tmax Soft 67

ClientApplication 554 ASP :ASP Program Windows 2000 Internet Informatio n Services 50 ASP IIS server ASP EJBHome look up <SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER> Sub Application_OnStart '*** Initialize the JVM Dim JvmCtl Set JvmCtl = ServerCreateObject("J2EECASJvmControl") 'when system classpath is set 'JvmCtlClasspath = "%_HOME%\lib\system\jeusjar;%_HOME%\webhome\ejb_home" JvmCtlClasspath = "c:\jeus42\lib\system\jeusjar;c:\jeus42\webhome\ejb_home" JvmCtlStartJvm '*** Create an enterprise services object for EJB access Dim Set = ServerCreateObject("J2EECASServices") ProviderURL = "localhost" '*** Retrieve reference to EJB home interface 'using enterprise services Dim AcctHome 'Change sky1020 Set AcctHome = LookupEjbHome("MyComAccount", "comaccountaccounthome") Set Application("AcctHome") = AcctHome End Sub </SCRIPT> LookupEjbHome("MyComaccount", "ComaccountAccountHome") ComaccountAccountHome Export MyComaccount EJB bean ASP request 68 Tmax Soft

ClientApplication ASP examples\asp IIS Virtual Internet Explorer ASP : ASP IIS Application Protection Error, Virtual Directory Property High(Isolated) 555 EJB Home EJB Remote, 56 CAS COM CAS J2EE CAS CAS J2EE CAS CAS COM Java, -COM Connector ( J2COM ) Java COM -COM Connector bridge Tmax Soft 69

ClientApplication 70 Tmax Soft

ClientApplication 6 -COM Connector (J2COM) 61 J2COM Java COM J2COM COM, Java Swing GUI MS Microsoft Java, Java COM EJB, Servlet, JMS Java VC VB COM, 62 J2COM 621 J2COM 2 (Local Invocation Remote Invocation) 622 J2COM / J2COM COM COM Manager Tmax Soft 71

ClientApplication 22 J2COM J2COM COM Java Java primitive String COM / J2COM Java COM Manager, COM J2COM / COM COM Manager,, 623 Service Category J2COM COM (COM Java ) COM Local Invocation J2COM Local Invocation COM COM COM JVM JNI 72 Tmax Soft

ClientApplication 23 Local Invocation [ 23] Java J2COM tool(j2comgen) COM : J2comGen Tool 64 COM COM Manager Remote Invoke Remote Invocation J2COM Remote Invocation J2COM Manager COM COM 24 Remote Invocation [ 24] Java COM COM COM Manager COM Manager COM Manager Tmax Soft 73

ClientApplication COM, COM COM Manager COM Manager J2COM Manager J2COM Manager 63 J2COM 631 J2COM J2COM 632 J2COM jeuscomj2com J2COM (j2comdll) jxercesjar Java jeusutilio NSStreamdll ( NSStreamso) J2COM Djavalibrarypath jar CLASSPATH 633 Local Invocation (j2comgen) 74 Tmax Soft

ClientApplication Remote Invocation COM COM J2COM Manager J2COM Manager J2COM Manager <j2com-severs> <j2com-server> <server-name>comserver1</server-name> <ip-address>14324811</ip-address> <port>1004</port> <timeout>10000</timeout> </j2com-server> </j2com-severs> <j2com-server> com COM server-name [ (required) default : null ]: COM ip-address [ (required) default : null ]: COM IP port [ (required) default : 0 ]: COM port timeout [ (optional) default : -1 ]: COM timeout ms COM J2COM Manager Dj2comconfigfile J2COM java -Dj2comconfigfile=<J2COMConfigFileName> -Dj2comCOMManagertraceLog=<TraceLog> Tmax Soft 75

ClientApplication -classpath <ClassPaths> jeuscomj2comcommanager J2COMConfigFileName [ (required) ]: J2COM TraceLog [ (optional) true false ]: J2COM Manager ClassPaths [ (required) ]: J2COM Manager jxercesjar, j2comjar jeusutilio 64 J2COM 641 COM Registration/Unregistration COM J2COM COM regsvr32 Emaildll /u regsvr32 /u Emaildll 642 Java Client (Local Invocation) COM tool(j2comgen) COM COM Manager j2comgen tool Java j2comgen l <TypeLibraryPath> -d <TargetDirectory> p <PackageName> v <verbose> c <javacaptalize> o <OptionalParamaterOverloading> 76 Tmax Soft

ClientApplication TypeLibraryPath [ (required) default : null ]: Type Library (idl) dll/olb file TargetDirectory [ (required) default : null ]: PackageName [ (required) default : null ]: <TargetDirectory>/src/<PackageNa me> verbose [ (optional) 1 0 ]: javacapitalize [ (optional) 1 0 ]: Java OptionalParameterOverloading [ (optional) 1 0 ]: [optional] parameter j2comgen j2comgen tool package email; import comtmaxj2com*; import comtmaxj2comconstant*; import comtmaxj2comio*; import javaio*; public class InewMail extends DispatchPtr { public InewMail(String progid)throws COMException { super(progid);} public InewMail(IUnknown other) throws COMException { super(other);} public InewMail(GUID ClsID)throws COMException { super(clsid);} Tmax Soft 77

ClientApplication public void mail(string company, String name) throws COMException { } } invoken("mail", new Object[] {company, name}); package email; import jeuscomj2com*; public class emailtest { public static void main(string[] args) { try{ InewMail newmail = new InewMail("EmailnewMail"); newmailmail("tmax", "navis"); }catch (COMException e) { eprintstacktrace(); } } } InewMail newmail = new InewMail("EmailnewMail") ID EmailnewMail COM GUID GUID guid_inewmail = new GUID("{16B17112-D1A1-4971-93CC- 5D42D77F95F3}"); InewMail newmail = new InewMail(guid_InewMail); : GUID COM ( IDL ) HKEY_CLASSES_ROOT ID newmailmail("tmax", "navis") 78 Tmax Soft

ClientApplication newmail mail mail String parameter J2COM COM catch (COMException e) COM COMException 643 Java Client (Remote Invocation) Local Invoke Remote Invoke COM Manager, COM COM Manager package email; import jeuscomj2com*; public class emailtest { public static void main(string[] args) { String[] arg = { "Tmax", "navis" }; try { String progid = "EmailnewMail"; COMManagerinvoke("COMServer1", progid, "mail", arg ); } catch ( ComException e) { eprintstacktrace(); } } } COMManagerinvoke("COMServer1", progid, "mail", arg ) ID EmailnewMail COM arg mail Object Array GUID GUID guid_inewmail = new GUID("{16B17112-D1A1-4971-93CC- 5D42D77F95F3}"); COMManagerinvoke("COMServer1", guid_inewmail, "mail", arg ); Tmax Soft 79

ClientApplication 65 GUID guid_inewmail J2COM 651 Local Invocation Remote Invocation 652 Local Invocation (A) COM COM Manager tool(j2comgen) COM Library (Part) VC++ ATL Wizard COM <<Mathidl>> // Mathidl : IDL source for Mathdll // // This file will be processed by the MIDL tool to // produce the type library (Mathtlb) and marshalling code import "oaidlidl"; import "ocidlidl"; [ object, uuid(9da6e3fd-0a77-489a-82d9-facdb294a4e5), dual, helpstring("iarithmetic Interface"), pointer_default(unique) ] interface IArithmetic : IDispatch { [id(1), helpstring("method Sum")] HRESULT Sum(int x, int y, [out, retval] int *sum); }; [ uuid(e318b006-a72e-429e-92bb-4c59cd2d53b9), version(10), 80 Tmax Soft

ClientApplication ] helpstring("math 10 Type Library") library MATHLib { importlib("stdole32tlb"); importlib("stdole2tlb"); }; [ uuid(50354dc9-e6ff-4a88-9cb7-8c1c4be1e5be), helpstring("arithmetic Class") ] coclass Arithmetic { [default] interface IArithmetic; }; <<Arithmetich>> // Arithmetich : Declaration of the CArithmetic #ifndef ARITHMETIC_H_ #define ARITHMETIC_H_ #include "resourceh" // main symbols ///////////////////////////////////////////////////////////////// // CArithmetic class ATL_NO_VTABLE CArithmetic : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CArithmetic, &CLSID_Arithmetic>, public IDispatchImpl<IArithmetic, &IID_IArithmetic, &LIBID_MATHLib> { public: CArithmetic() { } Tmax Soft 81

ClientApplication DECLARE_REGISTRY_RESOURCEID(IDR_ARITHMETIC) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CArithmetic) COM_INTERFACE_ENTRY(IArithmetic) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() // IArithmetic public: STDMETHOD(Sum)(int x, int y, /*[out retval]*/ int *sum); }; #endif // ARITHMETIC_H_ <<Arithmeticcpp>> // Arithmeticcpp : Implementation of CArithmetic #include "stdafxh" #include "Mathh" #include "Arithmetich" ///////////////////////////////////////////////////////////////// // CArithmetic STDMETHODIMP CArithmetic::Sum(int x, int y, int *sum) { // TODO: Add your implementation code here *sum = x + y; return S_OK; } J2COM Interface j2comgen tool package sample; import jeuscomj2com*; import jeuscomj2comconstant*; 82 Tmax Soft

ClientApplication import jeuscomj2comio*; import javaio*; public class IArithmetic extends DispatchPtr { public IArithmetic(String progid) throws COMException { super(progid);} public IArithmetic(IUnknown other) throws COMException { super(other);} public IArithmetic(GUID ClsID) throws COMException { super(clsid);} public int sum(int x, int y) throws COMException { return ((Integer)invokeN("Sum", new Object[]{new Integer(x), new Integer(y)} ))intvalue(); } } J2COM Client id COM package sample; import jeuscomj2com*; public class SumTester { public static void main(string[] args) { try { IArithmetic suminterface = new IArithmetic("MathArithmetic"); int sum = suminterfacesum(3,4); Systemoutprintln("3 + 4 = " + sum); } catch ( COMException e) { eprintstacktrace(); Tmax Soft 83

ClientApplication } } } d:\>java classpath ;d:\jeus\lib\system\j2comjar;d:\jeus\lib\system \jeusjar samplesumtester 3 + 4 = 7 653 Local Invocation (B) MS PowerPoint Java COM Library D:\Program Files\Microsoft Office\Office MSPPT9OLB J2COM Interface j2comgen javacapitalize false J2COM Client Java import ms*; import jeuscomj2com*; import jeuscomj2comwin32*; public class PptDemo { public static void main(string[] args) { try { Ole32CoInitialize(); Application app = new_ Application("PowerPointApplication"); appput("visible", true); 84 Tmax Soft

ClientApplication Presentations preses = appgetpresentations(); Presentation pres = presesadd(-1); Slide slide = presgetslides()add(1,1); Shapes shapes = slidegetshapes(); Shape shape = shapesitem(new Integer(1)); TextFrame frame = shapegettextframe(); TextRange range = framegettextrange(); rangesettext("welcome to J2COM"); slidegetshapes()item(new Integer(2))getTextFrame() gettextrange()settext("j2com Demonstration"); } } Ole32CoUninitialize(); } catch (Exception e) { eprintstacktrace(); } [ 25] Tmax Soft 85

ClientApplication 654 Remote Invocation 25 MS PowerPoint Slide Java MS Word COM Library (Part) MS Word Word COM VC++ 60 ATL Wizard <<Emailidl>> // Emailidl : IDL source for Emaildll // // This file will be processed by the MIDL tool to // produce the type library (Emailtlb) and marshalling code import "oaidlidl"; import "ocidlidl"; [ object, 86 Tmax Soft

ClientApplication ] uuid(2434bc8e-56c9-4b47-9884-703300a3ab27), dual, helpstring("inewmail Interface"), pointer_default(unique) interface InewMail : IDispatch { }; [id(1), helpstring("method mail")] HRESULT mail([in] BSTR company, [in] BSTR name); [ uuid(f757774e-c679-4673-916a-73dd9eed1fe3), version(10), helpstring("email 10 Type Library") ] library EMAILLib { importlib("stdole32tlb"); importlib("stdole2tlb"); }; [ uuid(16b17112-d1a1-4971-93cc-5d42d77f95f3), helpstring("newmail Class") ] coclass newmail { [default] interface InewMail; }; <<newmailh>> // newmailh : Declaration of the CnewMail #ifndef NEWMAIL_H_ #define NEWMAIL_H_ #include "resourceh" // main symbols Tmax Soft 87

ClientApplication ///////////////////////////////////////////////////////////////// // CnewMail class ATL_NO_VTABLE CnewMail : { public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CnewMail, &CLSID_newMail>, public IDispatchImpl<InewMail, &IID_InewMail, &LIBID_EMAILLib> public: CnewMail() { } DECLARE_REGISTRY_RESOURCEID(IDR_NEWMAIL) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CnewMail) COM_INTERFACE_ENTRY(InewMail) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() // InewMail public: STDMETHOD(mail)(/*[in]*/ BSTR company, /*[in]*/ BSTR name); }; #endif // NEWMAIL_H_ <<newmailcpp>> // newmailcpp : Implementation of CnewMail #include "stdafxh" #include "Emailh" #include "newmailh" #include "msword9h" ///////////////////////////////////////////////////////////////// // CnewMail STDMETHODIMP CnewMail::mail(BSTR company, BSTR name) 88 Tmax Soft

ClientApplication { AFX_MANAGE_STATE(AfxGetStaticModuleState()) COleVariant vopt(disp_e_paramnotfound, VT_ERROR); Application oapp; oappcreatedispatch("wordapplication"); if(!oapp) { AfxMessageBox("Cannot start Word"); return S_FALSE; } Documents odocs = oappgetdocuments(); Document odoc = odocsadd(vopt, vopt, vopt, vopt); //Add the field codes and text to the document Selection osel = oappgetselection(); Range orange; CHAR msg[128]; oseltypetext("dear "); WideCharToMultiByte(CP_ACP, 0, (LPWSTR)name, -1, msg, 128, NULL, NULL); oseltypetext(msg); oseltypeparagraph(); oseltypeparagraph(); oseltypetext("welcome to Tmax!"); oseltypeparagraph(); oseltypetext("work hard, play hard and enjoy Life!!"); oseltypeparagraph(); oseltypeparagraph(); WideCharToMultiByte(CP_ACP, 0, (LPWSTR)company, -1, msg, 128, NULL, NULL); oseltypetext(msg); oappsetvisible(true); Tmax Soft 89

ClientApplication } return S OK; J2COM Client COM Manager COM Java package email; import jeuscomj2com*; public class emailtest { public static void main(string[] args) { String[] arg = { "Tmax", "navis" }; String progid = "EmailnewMail"; } } try { COMManagerinvoke("COMServer1", progid, "mail", arg ); } catch ( COMException e) { eprintstacktrace(); } J2COM <?xml version="10"?> <j2com-severs> <j2com-server> <server-name>comserver1</server-name> <ip-address>1432481177</ip-address> <port>4444</port> <timeout>10000</timeout> </j2com-server> </j2com-severs> [ 26] 90 Tmax Soft

ClientApplication 26 MS Word Document 66 -COM bridge Java COM Tmax Soft 91

ClientApplication 92 Tmax Soft

ClientApplication 7 5 /J2EE Application Client Applet Client JNLP (Java Network Launching Protocol) /J2EE CAS (COM-to- interoperation) -COM Connector (J2COM: -to-com ) J2EE http://javasuncom/j2ee Server Management JMX Server Tmax Soft 93

ClientApplication 94 Tmax Soft

ClientApplication A jeus-client-dd: Application Client Deployment Descriptor A1 EJB EJBMainxml DTD _HOME\config\dtds ejb-main-configdtd 3 1 DTD/XML : XML a ( : (11) ) b DTD XML <tag name> c DTD Cardinality? = 0 1 e lement, + = 1 element, * = 0 element, ( ) = 1 element d P, 2 : XML a Description: b Value Description: Tmax Soft 95

ClientApplication c Value Type: ) String d Default Value: XML e Defined values: f Example: XML g Performance Recommendation: h Child Elements: 3 Example XML : jeus-client-ddxml A2 DTD/XML (1) <jeus-client-dd> (2) <module-info> (3) <module-name> (4) <app-main-class> (5) <app-argument>* (6) <system-log>? (7) <target>? P (8) <file-name>? (9) <buffer-size>? P (10) <level>? P (11) <security-info>? (12) <provider-node-name> (13) <user> (14) <password> (15) <scheduler>? (16) <env>* (17) <name> (18) <type> (19) <value> (20) <ejb-ref>? (21) <jndi-info>* (22) <ref-name> 96 Tmax Soft

ClientApplication (23) <export-name> (24) <res-ref>? (25) <jndi-info>* (26) <ref-name> (27) <export-name> (28) <res-env-ref>? (29) <jndi-info>* (30) <ref-name> (31) <export-name> A3 Element Reference (1) <jeus-client-dd> Description Child Elements Deployment Descriptor (2) module-info, (6) system-log?, (11) security-info?, (15) scheduler?, (16) env*, (20) ejb-ref?, (24) res-ref?, (28) res-env-ref? (2) <jeus-client-dd><module-info> Description Child Elements (3) module-name, (4) app-main-class, (5) app-argument* (3) <jeus-client-dd><module-info><module-name> Description Value Description Example <module-name>client_application1</modulename> Tmax Soft 97

ClientApplication (4) <jeus-client-dd><module-info><app-main-class> Description Value Description Example Client Container main(), <app-main-class>salaryclient</app-mainclass> (5) <jeus-client-dd><module-info><app-argument>* Description Value Description Example main() <app-argument>125000</app-argument> (6) <jeus-client-dd><system-log>? Description Child Elements message log (7) target?, (8) file-name?, (9) buffer-size?, (10) level? (7) <jeus-client-dd><system-log><target>? Description Value Description Default Value Defined values Example Performance Recommendation message log 2 (file, stdout) stdout stdout message log console file message log <target>stdout</target> message stdout system 98 Tmax Soft

ClientApplication (8) <jeus-client-dd><system-log><file-name>? Description Value Description Example log <file-name>c:\log\client</file-name> (9) <jeus-client-dd><system-log><buffer-size>? Description Value Description Message log buffer byte Default Value 1024 Example Performance Recommendation <buffer-size>1024</buffer-size> Message log buffer I/O 1024 byte (10) <jeus-client-dd><system-log><level>? Description Value Description Default Value Defined values Log 4 (fatal, notice, information, debug) log fatal < notice < information < debug log 4 debug fatal fatal notice administrator information debug Tmax Soft 99

ClientApplication Example Performance Recommendation <level>information</level> log I/O (11) <jeus-client-dd><security-info>? Description Child Elements Security (12) provider-node-name, (13) user, (14) password (12) <jeus-client-dd><security-info><provider-node-name> Description Value Description Example security node IP <provider-node-name>jeus_node1</providernode-name> (13) <jeus-client-dd><security-info><user> Description Value Description Example ID ID <user>john</user> (14) <jeus-client-dd><security-info><password> Description Value Description Example Base64 encode JManager tool <password>mtexmtexmq==</password> (15) <jeus-client-dd><scheduler>? Description Value Description Value Type Default Value JVM Scheduler Boolean Boolean false 100 Tmax Soft

ClientApplication Defined values Example true Scheduler false Scheduler <scheduler>true</scheduler> (16) <jeus-client-dd><env>* Description Child Elements environment entry (17) name, (18) type, (19) value (17) <jeus-client-dd><env><name> Description Value Description Example the environment entry <name>year</name> (18) <jeus-client-dd><env><type> Description Value Description Example java type java class <type>javalanginteger</type> (19) <jeus-client-dd><env><value> Description Value Description Example environment entry <value>2002</value> (20) <jeus-client-dd><ejb-ref>? Description Child Elements EJB reference (21) jndi-info* (21) <jeus-client-dd><ejb-ref><jndi-info>* Tmax Soft 101

ClientApplication Description Child Elements EJB reference JNDI (22) ref-name, (23) export-name (22) <jeus-client-dd><ejb-ref><jndi-info><ref-name> Description Value Description Example EJB <ref-name>count</ref-name> (23) <jeus-client-dd><ejb-ref><jndi-info><export-name> Description Value Description Example Naming Server EJB JNDI EJB deploy export-name <export-name>count_bean</export-name> (24) <jeus-client-dd><res-ref>? Description Child Elements resource (25) jndi-info* (25) <jeus-client-dd><res-ref><jndi-info>* Description Child Elements resource JNDI (26) ref-name, (27) export-name (26) <jeus-client-dd><res-ref><jndi-info><ref-name> Description Value Description Example <ref-name>datasource</ref-name> (27) <jeus-client-dd><res-ref><jndi-info><export-name> Description resource JNDI 102 Tmax Soft

ClientApplication Value Description Example server export name <export-name>oracle_datasource</export-name> (28) <jeus-client-dd><res-env-ref>? Description Child Elements resource environment (29) jndi-info* (29) <jeus-client-dd><res-env-ref><jndi-info>* Description Child Elements resource environment JNDI (30) ref-name, (31) export-name (30) <jeus-client-dd><res-env-ref><jndi-info><ref-name> Description Value Description Example resource environment <ref-name>jms/salaryinfo</ref-name> (31) <jeus-client-dd><res-env-ref><jndi-info><export-name> Description Value Description Example resource environment JNDI Naming Server JNDI resource environment entry <export-name>jms/salary_info_queue1</exportname> A4 jeus-client-ddxml <jeus-client-dd> <module-info> <<jeus-client-ddxml>> <module-name>client_application1</module-name> <app-main-class>salaryclient</app-main-class> <app-argument>125000</app-argument> </module-info> Tmax Soft 103

ClientApplication <system-log> <target>stdout</target> <file-name>c:\log\client</file-name> <buffer-size>1024</buffer-size> <level>information</level> </system-log> <security-info> <provider-node-name>jeus_node1</provider-node-name> <user>john</user> <password>mtexmtexmq==</password> </security-info> <scheduler>true</scheduler> <env> <name>year</name> <type>javalanginteger</type> <value>2002</value> </env> <ejb-ref> <jndi-info> <ref-name>count</ref-name> <export-name>count_bean</export-name> </jndi-info> </ejb-ref> <res-ref> <jndi-info> <ref-name>datasource</ref-name> <export-name>oracle_datasource</export-name> </jndi-info> </res-ref> <res-env-ref> <jndi-info> <ref-name>jms/salaryinfo</ref-name> <export-name>jms/salary_info_queue1</export-name> </jndi-info> </res-env-ref> </jeus-client-dd> 104 Tmax Soft

ClientApplication B JNLPMainxml: JNLP Resource Reference B1 EJB EJBMainxml DTD _HOME\config\dtds ejb-main-configdtd 3 4 DTD/XML : XML a ( : (11) ) b DTD XML <tag name> c DTD Cardinality? = 0 1 element, + = 1 element, * = 0 element, ( ) = 1 element d P, 5 : XML a Description: b Value Description: c Value Type: ) String Tmax Soft 105

ClientApplication d Default Value: XML e Defined values: f Example: XML g Performance Recommendation: h Child Elements: 6 Example XML : JNLPMainxml B2 DTD/XML (1) <jnlp-resource-config> (2) <jnlp-resource>* (3) <rsc-name> (4) <os-name>? (5) <arch>? (6) <locale>? (7) <version>? (8) <rsc-path> B3 Element Reference (1) <jnlp-resource-config> Description Child Elements JNLP Resource (2) jnlp-resource* (2) <jnlp-resource-config><jnlp-resource>* Description Child Elements JNLP-Resource (3) rsc-name, (4) os-name?, (5) arch?, (6) locale? 106 Tmax Soft

ClientApplication (7) version?, (8) rsc-path (3) <jnlp-resource-config><jnlp-resource><rsc-name> Description Example Resource URL http://19216812/jnlp/hellojeus/[rsc-name] <rsc-name>hellojeusjar</rsc-name> (4) <jnlp-resource-config><jnlp-resource><os-name>? Description Value Description Example Resource OS JVM osname prefix Resource OS Java osname <os-name>, <arch>, <locale> \ "Windows\ 95 Windows\ 2000" Windows 95 WWindows 2000 95 2000 \ <os-name>sunos</os-name> (5) <jnlp-resource-config><jnlp-resource><arch>? Description Value Description Example resource osarch resource <os-name> <arch>sparc</arch> (6) <jnlp-resource-config><jnlp-resource><locale>? Description Resource Tmax Soft 107

ClientApplication Resource Locale JNLP Value Description Example <os-name> <locale>en_us</locale> (7) <jnlp-resource-config><jnlp-resource><version>? Description (8) <jnlp-resource-config><jnlp-resource><rsc-path> Description Value Description Example Resource <rsc-path> c:\jeus42\webhome\client_home \HelloJeus\HelloJeusjar </rsc-path> B4 Sample JNLPMainxml File <<JNLPMainxml>> <jnlp-resource-config> <jnlp-resource> <rsc-name>hellojeusjar</rsc-name> <os-name>sunos</os-name> <arch>sparc</arch> <locale>en_us</locale> <version></version> <rsc-path> c:\jeus42\webhome\client_home\hellojeus\hellojeusjar 108 Tmax Soft

ClientApplication </rsc-path> </jnlp-resource> </jnlp-resource-config> Tmax Soft 109

ClientApplication 110 Tmax Soft

ClientApplication A Applet 11, 12, 17, 20, 35, 37, 38, 39 appletviewer 38 Architecture 19 ASP 17, 58, 68, 69 C CAS 14, 57 ClassPaths 76 Client Container 20, 21 COM 71 COM Manager 71 COM Registration 76 COM Unregistration 76 COMAccount 61 COMBRIDGE_HOME 61, 62 Configuration 105 D Deploy 26, 28, 37 Deployment Descriptor 12, 21, 26, 95 Directory 58 DTD 22, 96, 106 E Executing 62 H HelloJeus 43, 44, 45, 46, 48, 50, 51, 52 HTML 36 I ip-address 75 J J2COM 71 J2COM Local Invocation 76 J2COM Remote Invocation 79 J2COM 80 J2COMConfigFileName 76 Java Web Start 47, 48, 49 javacapitalize 77 CAS 12, 17, 57, 58, 59, 61, 64 jeusutilio 74 Mainxml 42, 43 jeus-servicesdll 59 Jmanager 22, 23, 28, 29, 32, 45, 46 JNDI 20 JNLP 11, 12, 15, 17, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 55, 105 JNLP 42, 44, 45, 48, 51, 53 JNLPMainxml 12, 41, 42, 45, 46, 47, 105 Tmax Soft 111