Академический Документы
Профессиональный Документы
Культура Документы
Objectives
After completing this lesson, you should be able to: Explain the motivation behind distributed systems List the major components of the Java Platform Enterprise Edition 5 (Java EE) specification
2-2
Distributed Systems
Distributed systems divide the work among several independent modules. The failure of a single module has less impact on the overall system, which makes the system more:
Available Scalable Maintainable
2-3
2-4
2-5
Java EE Standard
Java Platform Enterprise Edition 5 (Java EE) helps you to overcome distribution liabilities. Applications deployed with Java EE technologies are:
Standardized Adherent to specification guidelines Written in Java Deployable in any compliant application server
Java Community Process (JCP) is the oversight (custodial) process for moderating Javas future direction.
http://jcp.org/en/home/index http://jcp.org/en/introduction/faq
2-6
Java EE Architecture
Oracle WebLogic Server Java EE Application Server
Web client Web Container Servlets Applet JSPs EJB Container Session EJBs Entity EJBs RDBMS
Directory service
Client application
CORBA
Java app Message queue
JAXWS
RMI
Web service
2-7
Java Servlets
A servlet is a Java program that executes on the server, accepting client requests and generating dynamic responses. The most prevalent type of servlet is an HttpServlet that accepts HTTP requests and generates HTTP responses. Servlets:
Do not just generate HTML Can also be used to generate other MIME types, such as images
2-8
SimplestServlet.java
Creates HTML
package mypackage; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class SimplestServlet extends HttpServlet { public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<HTML><BODY>"); out.println("<H1>Hello, World!</H1>"); out.println("</BODY></HTML>"); } }
2-9 Copyright 2009, Oracle. All rights reserved.
2 - 10
realsimple.jsp
Creates HTML
<!-- this is a comment --> <HTML> <HEAD> <TITLE>My title</TITLE> </HEAD> <BODY> <H1>A big heading</H1> <P>Blah blah blah blah blah.</P> <% for (int i=0; i<3; i++) { %> <H3>Say it again, Sam.</H3> <% } %> </BODY> </HTML>
2 - 11
2 - 12
Purchased or obtained
Purchased or obtained
Database
2 - 13
WLS server
LDAP server
File system
DNS system
Other
Service
2 - 14
JNDI Tree
Root context
IC
Initial context
Context B is bound to the initial context.
O1
Object O1 is bound to the initial context.
O2
Object O2 is bound to context A.
O3 O3
O4
2 - 15
2 - 16
If the following context exists: com.oracle.examples Then you cannot bind: com.oracle.examples.ejb.SomeObject Without first creating: com.oracle.examples.ejb
2 - 17
Written by developers
JTA
2 - 18
JMS Point-to-point domain server Publish/subscribe Destination (pub/sub) domain Guaranteed message delivery Transactional participation Dynamically configurable services Application- or systemConsumer Consumer scoped resources Interoperability with other messaging systems
2 - 19 Copyright 2009, Oracle. All rights reserved.
Consumer
2 - 20
The specification describes MBeans, which are the building blocks of JMX.
MBean
2 - 21
Client components
JCA client API (CCI) System contracts
Resource adapter
Inbound/ Outbound
EIS
EIS API
2 - 22
Client Application
The client application interacts with WLS through JRMP/T3, IIOP, and jCOM. The types of clients include:
Stand-alone Java applications Applets within a browser
Web client HTML/XML WebService Client Applet Client application
2 - 23 Copyright 2009, Oracle. All rights reserved.
Oracle WebLogic Server Web container EJB container Session EJBs Entity EJBs
Web Client
A Web client interacts with Oracle WebLogic Server via HTTP using servlets or JSPs. The types of Web clients include:
Browser WebService (SOAP over HTTP)
WebLogic Server
2 - 24
Proxy Server
The proxy server:
Forwards requests to other machines Can be used as a level of indirection and security Can be used to loadbalance a system Client
Server A
Proxy server
Server B
Server C
2 - 25
Web Server
Web servers: Provide Web content Communicate via HTTP, FTP, and so forth Can handle CGI requests Proxy some requests to application servers
Web server
HTTP HTTPS WebLogic Server plug-in HTTP HTTPS
2 - 26
Firewalls
Provide filtering, authorization, and authentication services Help keep out hackers Map port requests Can act as proxy servers Can decrease back-end network activity
Firewall
HTTP
HTTP
HTTPS
HTTPS
2 - 27
Application Servers
Provide services that support the execution and availability of deployed applications Handle heavier processing chores than Web servers
Oracle WebLogic Server Java EE Application Server Web container Servlets JSPs EJB container Session EJBs Entity EJBs
JAX-WS
JDBC
JAAS
JNDI
JMS
JMX
RMI
JTA
2 - 28
Firewall
Web server
App servers
SvrA SvrB SvrV SvrW SvrX SvrY SvrZ
WLS plugIn
Inner network
Firewall
App servers
SvrA SvrB SvrC SvrD SvrE SvrV SvrW SvrX SvrY SvrZ
DB
Quiz
Oracle WebLogic Server 10.3.1 is certified with JDK 1.6. 1. True 2. False
2 - 31
Summary
In this lesson, you should have learned how to: Explain the motivation behind distributed systems List the major components of the Java EE specification
2 - 32
2 - 33
2 - 34