330 likes | 555 Views
J2EE Overview. 최근 동향. 대용량 트랜잭션에 대한 처리 요구 증대 비즈니스 로직을 위한 새로운 티어의 추가 구성의 복잡성이 증대 가벼운 서버 가벼운 클라이언트 인터넷의 발달 표준 플랫폼의 필요성. Component Transaction Monitor. C( 컴포넌트 모델 ) T( 트랜잭션 관리 ) M( 모니터 : 자원 및 서비스 관리 ). Server-Side Component Model. Business logic. Business logic. Services. Services.
E N D
최근 동향 • 대용량 트랜잭션에 대한 처리 요구 증대 • 비즈니스 로직을 위한 새로운 티어의 추가 • 구성의 복잡성이 증대 • 가벼운 서버 • 가벼운 클라이언트 • 인터넷의 발달 • 표준 플랫폼의 필요성
Component Transaction Monitor • C(컴포넌트 모델) • T(트랜잭션 관리) • M(모니터:자원 및 서비스 관리) Server-Side Component Model • Business logic Business logic Services Services • Naming • Transactions • Security • Managed persistence • Others …
J2EE (Java 2 Enterprise Edition) • Business logic 정의 Services 구현
J2EE 플랫폼 • 호스팅 애플리케이션을 위한 런타임 인프라 구조 • 애플리케이션 구축을 위한 자바 확장 API 집합
J2EE Containers, Services Applet Container Component ? Database Management System JNDI RMI-IIOP Web Container EJB Container J2SE JMSJAASJTA JCXJDBCJAXP JMSJAASJTA JCXJDBCJAXP JAVA MailJAF JAVA MailJAF JCBCJAXPJAASJMS RMI-IIOP RMI-IIOP JNDI JNDI Application Client Container J2SE J2SE RMI-IIOP JNDI J2SE
applets session beans servlets entity beans Applet Container JSPs message driven beans Database Management System JNDI RMI-IIOP Web Container EJB Container J2SE JMSJAASJTA JCXJDBCJAXP JMSJAASJTA JCXJDBCJAXP JAVA MailJAF JAVA MailJAF applicationclients JCBCJAXPJAASJMS RMI-IIOP RMI-IIOP JNDI JNDI Application Client Container J2SE J2SE RMI-IIOP JNDI J2SE J2EE Components
J2EE Application module application.xml(deployment descriptor) Java module Web module EJB module RA module .ear file Resource Adapter module Java module Web module EJB module application-client.xml(deployment descriptor) web.xml(deployment descriptor) ejb-jar.xml(deployment descriptor) ra.xml(deployment descriptor) Java component Web component EJB component RA component .jar file .war file .jar file .rar file J2EE Component Deployment Modules
J2EE Technologies RMI-IIOP JNDI JDBC JTA / JTS JMS Server-Side Component Model EJB
Enterprise Java Bean • Multi-tier, cross-platform, 분산 객체 등을 지원하는 자바 애플리케이션을 개발하고 배치하기 위한 자바 컴포넌트 아키텍쳐 • 분산객체와 트랜잭션 프로세싱 모니터 기술의 접목 • 컴포넌트 트랜잭션 모니터에 대한 자바 server-side 컴포넌트 모델
Types of Enterprise Beans EJB Entity Message Session Stateful Stateless CMP BMP
Ingredients of an Enterprise JavaBean Type Definition • 리모트 인터페이스 • 홈 인터페이스 • 빈 클래스 • 프라이머리 키 • 디플로이 디스크립터 • EJB는 단일 단위로 묶인 자바 클래스들과 XML 파일의 집합체이다. • 자바 클래스들은 정확한 규칙을 따라야 하고 콜백 메소드를 제공해야 한다.
1 Define Your Component Code 2 Make Deployment Descriptor 3 Client Stub javac 9 4 ImplementClient DDCreator 7 Deploy component on server & if needed, make database table 5 ejbc 10 javac 11 6 jar Start theClient 8 Start theServer Server Client EJB Development Steps
Evolution of EJB Standard • EJB 1.0 defines: • Session and entity beans • Client and developer’s view of EJBs • EJB roles • EJB 1.1 • Introduces declarative (XML-based) deployment descriptors • EJB 2.0 • Introduces message-driven beans • Enriches and standardizes support for persistence of entity beans • Complex database mapping, complex relationships • Adds local interfaces • Supports network interoperability among EJB servers • Mandatory IIOP
EJB Container, Server EJB Container • 컴포넌트를 위한 실행환경 EJB Server • 컨테이너를 위한 실행환경
Session, Entity Beans Entity Bean Session Bean • 클라이언트의 확장 • 다른 빈들과 상호 작용하는 작업이나 워크플로우를 구현 • 퍼시스턴스를 가지며 사람,장소,물건 등을 나타낸다. • 데이터베이스의 row와 1:1매핑
Stateful, Stateless Session Stateful Stateless • 세션 상태가 저장됨 • 클라이언트 수 = Bean Instance수 • 클라이언트 컨텍스트가 관리됨 • 스와핑이 일어남 (상태가 저장됨) • 세션 상태가 저장 안됨 • 하나의 Bean Instance가 여러 client에 대응 • 클라이언트 컨텍스트가 관리 안됨 • 스와핑이 일어나지 않음
Stateful Instance Life Cycle • 메모리가 아닌 Secondary Storage로의 저장
CMP, BMP Entity CMP BMP • EJB Container가 Bean의 Persistency관리 • Persistency를 위한 코딩이 없음 • SQL구문에 대한 제어가 필요 없음 • 기능상의 제약을 가져올 수 있음 • DB관련 optimization이 불가능 • Persistency를 위한 코딩이 필요 • SQL질의에 대한 제어가 가능 • 복잡한 기능 구현이 가능
The SMART Platform Web Enablement W3C Web Edition Integration and High speed VisiBroker Edition OMG Advanced Frameworks AppServer Edition J2EE The World Market Borland Enterprise Server
Open Source Apache Tomcat Borland Tomcat Borland Web Engine VisiBroker Load balancing Fault-tolerance Failover Borland Borlandization QA & Support Borland Enterprise Server, Web Edition
Borland Tomcat Borland Tomcat Borland Tomcat Open Source Apache Tomcat Borland Tomcat Borland Web Engine Console Borland IDEs IIOP Stateful Session Management Database operations WebEdition JDataStore Pure O/R Java Database Borland Borland Enterprise Server, Web Edition
Borland Tomcat Borland Tomcat Borland Tomcat Borland Web Engine Borland Tomcat Http/SOAP IIOP Internet Borland Gatekeeper Database operations IIOP Stateful Session Management IIOP Firewall Firewall VisiBroker C++ VisiBroker Java JDataStore Pure O/R Java Database Console Borland Enterprise Server, VisiBroker Edition
VisiBroker Edition Web Edition AppServer™ Edition AppServer™ Edition AppServer Edition AppServer™ Edition Borland Tomcat Borland Tomcat Borland Web Engine Borland Tomcat JAAS™ JMS™ Servlets JSP™ RMI/IIOP™ JAXP™ JNDI™ VisiBroker C++ VisiBroker Java Console JDBC™ JavaMail™ JavaMail™ & JAF JCA™ JTA™ JTS™ Java IDL™ Borland Enterprise Server, AppServer Edition J2EE 1.3 Complaint
Partition Based Architecture Partitions = “virtual application servers” running within one server instance Applications can run securely and independently in a partition Applications can be scaled locally or across the net Applications can be individually managed The only architecture designed to run enterprise applications in production environments Borland Enterprise Server, AppServer EditionPartitioning (ASAP)
Borland Enterprise Server Web Edition AppServer Edition VisiBroker Edition Borland Enterprise Server –AppServer Edition • J2EE 1.3 Compliant • Includes VisiBroker Edition; seamless integration of J2EE and CORBA services • Enterprise Java Beans 2.0 • Java Connector Architecture • Java Messaging Service (via SonicMQ) • Servlet 2.3 and JSP 1.2 support • Java Authentication and Authorization Security • Includes VisiBroker Edition
JDBC Web-WAS-DB구성 iPlanet Web Server Borland Enterprise Server Web Container Web Container JSP JSP Partition Partition Servlet Servlet EJB Container Client Beans Client Beans EJB EJB EJB EJB Container EJB EJB Data Base 장비 DBMS
Component의 종류 구체적 (도메인 종속적) Application Component(도메인 컴포넌트) 통합 개발 환경 Business Component(특정 비즈니스 컴포넌트) Business Component(공용 비즈니스 컴포넌트) Infrastructure Component(시스템 기반 서비스/유틸리티) 일반적 (범용적)