Figure 1 - PowerPoint PPT Presentation

1 / 74
About This Presentation
Title:

Figure 1

Description:

Uses a DCOM-based protocol to communicate between transaction managers ... COM/DCOM. Enterprise JavaBeans. EJB 1.0 specification released in the spring of 1998 ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 75
Provided by: david2224
Category:

less

Transcript and Presenter's Notes

Title: Figure 1


1
Comparing Windows DNA and .NET with Enterprise
Java David ChappellPrincipal, Chappell
Associates www.chappellassoc.com
david_at_chappellassoc.com
2
Enterprise Applications Today
Browser Client
HTTP
DBMS
Web Server
DBMS
Supporting Services
Server Machine
Non-Browser Client
Object protocol
Existing Applications
3
Making Choices
  • The two technology options are
  • Microsoft Windows DNA technologies
  • Java 2 Platform, Enterprise Edition (J2EE)
  • Kinds of applications
  • B2C
  • B2B
  • B2E

4
What is Windows DNA?
  • A broad marketing label
  • What it includes changes over time
  • It refers to specific technology implementations
    from Microsoft
  • Most of Windows DNA is bundled with Windows
    NT/Windows 2000

5
Core Windows DNA Technologies
  • COM and COM
  • COM is derived from the Microsoft Transaction
    Server (MTS)
  • Active Server Pages (ASPs)
  • ActiveX Data Objects (ADO), OLE DB, and ODBC
  • Microsoft Message Queuing (MSMQ)
  • Distributed Transaction Coordinator (DTC)

6
Illustrating Windows DNA
Visual InterDev
Browser Client
HTTP
DBMS
IIS
ASP Applications
ADO
VB, VC, VJ
DBMS
ADO
COM
DBMS
Rich Client
DCOM
Windows 2000
7
What is J2EE?
  • API specifications
  • A reference implementation of those APIs
  • API compatibility tests
  • And a brand

8
Core J2EE Technologies
  • Enterprise JavaBeans (EJB)
  • JavaServer Pages (JSPs)
  • Java Servlets
  • JDBC
  • Java Message Service (JMS)
  • Java Transaction Service (JTS)
  • Java Naming and Directory Interface (JNDI)

9
Illustrating J2EE
Various JSP Tools
Browser Client
HTTP
DBMS
HTTP Listener
JSP Pages
JDBC
VariousJava Tools
Java Servlets
JDBC
DBMS
JDBC
EJB
DBMS
Rich Client
IIOP, Others
Unix, Windows NT/2000, OS/390, others
10
Example J2EE Products
  • BEA WebLogic
  • IBM WebSphere Application Server
  • Oracle Application Server
  • SilverStream Application Server
  • Sun iPlanet Application Server
  • Inprise Application Server
  • Iona iPortal Application Server
  • Many more

11
General Issues (1)
  • Operating system support
  • Any system or Microsoft systems only?
  • Development languages
  • Any language or Java only?
  • Price
  • Separately or bundled?
  • How expensive is the hardware?

12
General Issues (2)
  • Vendor choice
  • Choose the technology from multiple vendors or
    just one?
  • Maturity
  • Ease of use

13
COM-Based Technologies
Machine X
Machine Y
In-process server
Client
Local Server
Remote Server
COM
DCOM
COM Runtime
Transactional COM Object
DCOM
14
CORBA-Based Technologies
Machine X
Container
Local Object
Machine Y
IIOP
IIOP
Remote Object
15
Java-Based Technologies
Machine X
Machine Y
JavaBeans
Client
Java Application
Remote Java Application
Various
IIOP, Others
EJB Container
Enterprise Bean
IIOP, Others
16
Windows DNA Data Access
ADO
Client
DBMS or other data source
OLE DB
Data
ODBC
17
J2EE Data Access
JDBC
Client
DBMS or other data source
Data
ODBC
18
ADO Issuing a Query
ADO Client
Connection
DBMS
19
JDBC Issuing a Query
JDBC Client
DBMS
Connection
20
Controlling DBMS Transactions in ADO
DBMS, e.g., SQL Server
ADO Client
Connection
Transaction Manager
Database
21
Controlling a DBMS Transaction in JDBC
DBMS, e.g., Oracle
JDBC Client
Connection
Transaction Manager
Database
22
Controlling Distributed Transactions (1)
Resource Manager (e.g., Oracle)
JDBC or ADO
Client
Distributed Transaction Manager
Distributed Transaction Manager
Resource Manager (e.g., SQL Server)
23
Controlling Distributed Transactions (2)
Resource Manager (e.g., Oracle)
JDBC or ADO
Client
Distributed Transaction Manager
Resource Manager (e.g., SQL Server)
Distributed Transaction Manager
24
Choices for a Distributed Transaction Manager (1)
  • Microsofts Distributed Transaction Coordinator
    (DTC)
  • Part of Windows NT/Windows 2000
  • Uses a DCOM-based protocol to communicate between
    transaction managers
  • Can expose services to applications through OLE
    Transactions API

25
Choices for a Distributed Transaction Manager (2)
  • An implementation of CORBAs Object Transaction
    Service (OTS)
  • Uses IIOP to communicate between transaction
    managers
  • An implementation of the Java Transaction Service
    (JTS)
  • A Java mapping of the CORBA OTS
  • Exposes services to Java applications through the
    Java Transaction API (JTA)
  • Some other vendor-specific technology

26
The Trouble with Transactions
  • Developers dont want to use technologies like
    JTS/OTS or Microsoft DTC directly
  • Theyre too complicated
  • But distributed transactions are sometimes
    required
  • Wed like a simpler solution
  • Such as a transaction processing (TP) monitor,
    e.g., COM and EJB

27
What COM and EJB Can Do
  • Make transactions easy for developers
  • Provide support for scalability
  • Provide easy-to-use authorization services
  • Make writing multi-threaded apps easier
  • More . . .

28
MTS/COM
  • First released by Microsoft in late 1996
  • MTS is a standard part of Windows NT 4
  • COM is a standard part of Windows 2000
  • COM is the next release of MTS plus a bit more

29
Illustrating COM
COM Surrogate or IIS
COM Runtime
Client
COM Object
OLE DB Providers
DBMSs
COM/DCOM
30
Enterprise JavaBeans
  • EJB 1.0 specification released in the spring of
    1998
  • EJB 1.1 spec released in late 1999
  • EJB 2.0 spec appeared in mid-2000
  • Created by Sun, IBM, Oracle, and others
  • Built entirely on the Java platform
  • Promises Write Once, Run Anywhere

31
Illustrating EJB
EJB Server
EJB Container
Client
DBMS Drivers
Enterprise Bean
DBMSs
IIOP, others
32
COM Transactions (1)
DBMS, e.g., Oracle
COM Runtime
Client
DBMS Drivers
Object
DBMS, e.g., SQL Server
Distributed Transaction Coordinator (DTC)
33
COM Transactions (2)
DBMS, e.g., Oracle
COM Rntime
Client
DBMS Drivers
Object
DBMS, e.g., SQL Server
Distributed Transaction Coordinator (DTC)
34
Starting a COM Transaction
  • Whether a transaction is started depends on the
    value configured for this components transaction
    attribute
  • Possible values
  • Requires New
  • Required
  • Supported
  • Not Supported

35
Choices for Controlling EJB Transactions
  • Client-managed
  • Bean-managed
  • Container-managed

36
EJB Container-Managed Transactions (1)
DBMS, e.g., Oracle
EJB Container
Client
DBMS Drivers
Enterprise Bean
DBMS, e.g., DB2
Transaction Service
37
EJB Container-Managed Transactions (2)
DBMS, e.g., Oracle
EJB Container
Client
DBMS Drivers
Enterprise Bean
DBMS, e.g., SQL Server
Transaction Service
38
Starting an EJB Container-Managed Transaction
  • Whether a transaction is started depends on the
    value configured for this beans transaction
    attribute
  • Possible values
  • TX_REQUIRED
  • TX_REQUIRES_NEW
  • TX_SUPPORTS
  • TX_NOT_SUPPORTED
  • TX_MANDATORY
  • TX_BEAN_MANAGED

39
Ending an EJB Container-Managed Transaction
  • When a method invocation returns to the client,
    the EJB container commits the transaction
  • Unless a bean in the transaction called
    setRollbackOnly or raised an exception
  • This is like the default behavior in COM
  • Especially with the COM auto-done attribute

40
Managing a Transactional COM Objects State
  • Any COM object that calls SetComplete or SetAbort
    is deactivated
  • The objects in-memory state is destroyed
  • The object is re-activated the next time one of
    its methods is called
  • This is known as Just-In-Time (JIT) activation

41
Managing an Enterprise Beans State (1)
  • EJB defines two kinds of beans
  • Session beans
  • Entity beans
  • Support requirements
  • Session beans are mandatory
  • Entity beans are optional in EJB 1.0
  • Entity beans are mandatory in EJB 1.1

42
Managing an Enterprise Beans State (2)
  • Unlike COM, an EJB container doesnt always
    deactivate a bean at the end of each transaction
  • A bean may maintain state across transaction
    boundaries
  • State is managed differently for session and
    entity beans
  • There are several options

43
Managing an Enterprise Beans State (3)
Enterprise Bean
Session Bean
Entity Bean
Stateless Session Bean
Stateful Session Bean
Bean-Managed Persistence (BMP) Bean
Container-Managed Persistence (CMP) Bean
44
COM Role-Based Authorization
COM Runtime
Teller
Teller, Manager
Manager
Teller, Manager
Manager
Administrator
45
EJB Role-Based Authorization
  • Like COM, EJB supports configurable, role-based
    authorization
  • The EJB Container will automatically deny access
    to clients not in the defined role
  • Like COM, access can be controlled to
  • An entire bean
  • Specific methods in the bean

46
Comparing COM and EJB
  • Complexity
  • Maturity
  • Platform support
  • Language support
  • Completeness

47
Complexity (1)
  • COM has
  • One kind of object
  • One way to control transactions
  • One model for state management
  • One way to invoke methods

48
Complexity (2)
  • EJB has
  • Two kinds of objects
  • Three ways to control transactions
  • Many approaches to state management
  • Multiple access protocols
  • Relatively complex interactions among these
    options
  • EJB was created by a committee, and it shows

49
Maturity
  • COM (MTS) shipped in late 1996
  • Its in production use at many organizations
  • The EJB spec shipped in spring 1998
  • Products began appearing by the end of that year
  • Its in production use at some organizations
  • COM is way ahead

50
Platform Support
  • EJB will run on many platforms
  • Various Unixes, NT, OS/390, more
  • MTS/COM runs only on NT/2000
  • Microsoft appears to have no interest in porting
    it anywhere else
  • For organizations that wish to write new business
    logic on systems other than Windows, EJB is the
    only OTM choice

51
Language Support
  • EJB allows building applications only in Java
  • COM allows building applications in many
    languages
  • Including Visual Basic, C, and Java
  • There are many more experienced VB developers in
    the world today than Java developers

52
Completeness
  • COM is a shipping product
  • With standard solutions for distributed security
    services, directory services, communication
    protocols, etc.
  • It also provides standard administrative tools
  • EJB is a specification
  • Different vendors do different things for
    distributed security, directory services,
    communication protocols etc.
  • Administration is quite different across vendors

53
Building Web Applications
Web Server
CGI Application
CGI
HTTP
ISAPI DLL
Components
Java Servlets
ASPs/JSPs
54
Understanding Java Servlets
  • A servlet is a Java program that can be loaded
    into and run in a web server
  • Application servers can also support servlets
  • It runs inside a servlet container
  • The container provide services such as session
    management
  • A servlet container and its servlets can run in
    the same process as a web server or in another
    process

55
Understanding ASPs/JSPs
  • A clients request to access a URL causes the web
    server to execute a server-side script
  • That script sends a stream of information back to
    the web server
  • The web server sends that information to the
    client
  • Server-side scripting is
  • Easier than Java servlets or ISAPI
  • Very popular

56
Illustrating ASPs
IIS
ltHTMLgt ltTITLEgtExamplelt/TITLEgt ltBODYgt ltH1gtAn ASP
Examplelt/H1gt lt response.write "ltHRgt"
response.write "Hello!" response.write "ltHRgt
gt lt/BODYgt lt/HTMLgt
4) Browser renders HTML
example.asp
www.acme.com
57
ASPs and COM Objects
ADO
IIS
Connection
ASP Extension
ASP Script
HTTP
Command
Built-in Objects
Recordset
Other COM Objects
Database
58
Built-in COM Objects for ASPs
ASP Extension
IIS
ASP Script
Request
HTML, HTTP
Response
Server
Session
Application
Object Context
COM Runtime
59
Java Server Pages (JSP)
  • Allow dynamically creating HTML by embedding
    scripts in a web page
  • Scripts are typically written in Java
  • When first accessed, each JSP can be compiled
    into a Java servlet
  • JavaBeans are the core component approach
    supported by JSP
  • Although its also possible for JSP pages to use
    Enterprise JavaBeans

60
JSP and Other J2EE Technologies
Web Server
EJB Objects
JSP Container
JSP Script
HTTP
JavaBeans
Implicit Objects
JDBC Objects
Other Java Objects
Database
61
Implicit Objects for JSPs
JSP Container
Web Server or App Server
JSP Script
Request
HTTP
Response
Session
Application
Exception
62
Writing JSPs Action Elements
  • Use XML syntax
  • Standard actions include
  • ltjspuseBeangt makes a JavaBean available for use
  • ltjspsetPropertygt writes properties to a
    JavaBean
  • ltjspgetPropertygt reads properties from a
    JavaBean

63
Microsoft Message Queuing (MSMQ)
  • An implementation of a message queuing system
  • Provides point-to-point message exchange
  • Multiple APIs are available
  • C API
  • COM API
  • Queued components

64
Illustrating MSMQ
Application
Application
Message
MSMQ API
MSMQ API
Queue
Queue Manager
Queue Manager
65
Java Message Service (JMS)
  • A set of Java classes that define an API to any
    message queuing system
  • Both point-to-point and publish-and-subscribe
    models are supported
  • Supported today over IBM MQseries and other
    products
  • Omitted topics include
  • Security
  • Administration
  • Error notification

66
Conclusions
  • Microsoft Windows DNA provides APIs and
    implementations
  • Works with one OS and many languages
  • J2EE provides APIs
  • Different vendors provide the software
  • Works with many OSs and one language
  • Both will survive
  • Windows DNA will likely be more widely used

67
Building Applications
  • Windows development today relies on Windows DNA
  • With .NET also this will be used
  • The .NET Enterprise servers
  • For building more effective distributed
    environments
  • Web services
  • For accessing services on Intranets and the
    Internet
  • The .NET Framework
  • for a better application foundation

68
The .NET Enterprise Servers
  • Windows DNA applications can benefit from
  • XML-based integration
  • Solid data storage
  • Effective messaging
  • Protection from Internet attacks
  • The .NET Enterprise servers address the needs

69
Enterprise servers
  • BizTalk Server 2000
  • Integrating and controlling business processes in
    diverse applications
  • SQL Server 2000
  • Storing and accessing relational and XML data
  • Exchange 2000
  • Providing enterprise messaging services

70
Enterprise Servers II
  • Host Integration Server (HIS) 2000
  • Commerce Server 2000
  • Application Center 2000
  • Internet Security and Acceleration (ISA) Server
    2000
  • the next generation of proxy server

71
Web Services
  • Methods exposed via the Simple Object Access
    Protocol (SOAP)
  • SOAP uses XML and HTTP
  • SOAP is being standardised W3C
  • Microsoft will provide .NET Building Block
    services

72
The .NET Framework
  • Key technologies
  • The Common Language Runtime (CLR)
  • The unified class Library
  • ADO for XML access
  • Win Forms
  • ASP improved support for building web
    applications

73
.NET Framework II
  • Support for programming languages
  • c
  • Visual Basic.NET
  • C
  • Perl
  • COBOL
  • Simpler component technology
  • Interoperability cross-language
  • Code security

74
C
  • A new language designed for this framework
  • Full object-oriented
  • Syntax based on C/C
  • Built-in support for interfaces, properties and
    events
  • Support for attributes
  • Garbage collection
Write a Comment
User Comments (0)
About PowerShow.com