Presentation to LaSalle Universitys - PowerPoint PPT Presentation

About This Presentation
Title:

Presentation to LaSalle Universitys

Description:

... limitation, in January 2006 the JCP released a reference implementation and ... g. Apache Software Foundation) or Java Community Process satisfies the shortfall ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 45
Provided by: genewe
Learn more at: http://www1.lasalle.edu
Category:

less

Transcript and Presenter's Notes

Title: Presentation to LaSalle Universitys


1
  • Presentation to LaSalle Universitys
  • CIS 679 Middleware Architecture Class
  • Javas Role in Enterprise Middleware
  • Gene Wenning
  • gwenning_at_liveprecision.com
  • March 20, 2006

2
Outline
  • Introduction to Java
  • What is Java?
  • How is a Java Program Developed?
  • Java is a Platform
  • J2EE Javas Role In Enterprise Middleware
  • Logical Application Tiers
  • Logical Architecture
  • Container Frameworks
  • Other Relevant Frameworks
  • Communication Mechanisms
  • Support for XML
  • Support for Security

3
Outline
  • Javas Next Big Thing in Middleware Java
    Business Integration (JBI) API
  • Closing Thoughts on Java
  • Preparation for future demonstration (4/24/2006)
    of a Custom Developed, Java Message Broker by
    reviewing
  • Driving Requirements for the Message Broker
  • Review the Use Cases that will be demonstrated

4
Outline (continued)
5
What is Java?
  • Java is a high level programming language that
  • is object oriented
  • supports concurrent programming via threading
  • can be executed on many machines and vendor
    operating systems
  • can be written once and executed anywhere
  • is free subject to the acceptance of a reasonable
    licensing agreement with Sun Microsystems

As adapted from Suns Java Tutorial
http//java.sun.com
6
How is a Java Program Developed?
  • A Java software developer kit (JDK) is obtained
    from either Sun Microsystems or your hardware
    vendor of choice
  • You install the JDK
  • You set up Javas environment variables
  • JAVA_HOME specifies where Javas SDK resides in
    your file system
  • PATH edit this to include Javas bin
    directory within your computers execution path
    (i.e. a list of places where it should look to
    find programs to run)
  • You can write Java programs in a simple text
    editor
  • Only rule all programs must end in .java in
    order for the compiler to recognize them
  • You compile your Java to progam to byte code
  • You execute your byte code within a Virtual
    Machine
  • The virtual machine interprets the byte code and
    interacts with the native operating system to
    accomplish your programs tasks

7
How is a Java Program Developed?
Runs in the Java Virtual Machine
Runs in the Java Virtual Machine
Picture taken from Suns Java Tutorial
8
Java is a Platform
  • A platform is the hardware or software
    environment in which a program runs
  • Typically described as a combination of the
    operating system and underlying hardware
  • The Java Platform is a software-only platform
    that runs on top of other platforms (e.g.
    Microsoft Windows, Mac O/S, Sun Solaris, etc.)
  • Consists of two components
  • Virtual Machine (JVM)
  • Application Programming Interface (API)

9
The Java Platform
  • JVM interprets compiled Java byte code into
    machine dependent instructions
  • JVM actually resides in a package called the Java
    Runtime Edition (JRE).
  • Bundled within the JDK
  • Enables execution of Java programs without the
    bloat of the JDK

10
The Java Platform (continued)
  • An API is a set of routines provided in libraries
    that extends a language's basic functionality
  • Java calls libraries packages.
  • Packages typically are compressed in a form
    similar to a ZIP file called Java Archive files
    (i.e. jars).
  • Java programs are always defined as Classes
    because Java is object oriented
  • Classes are sometimes referred to as Beans.
  • Drives the saying Beans are in the Jar
  • Two types of APIs exist in Java
  • Interface Specifications Non-Functional
    Libraries
  • Implementations Functional Libraries

11
The Java Platform (continued)
  • Use of an Interface Specification API library
    always requires the use of an implementation
    library
  • Typically used when implementation is vendor
    dependent and is not a native resident of the
    hardware platform on which Java is executing
  • Javas Database Connectivity (JDBC) API is an
    example of an interface API (i.e. jdbc.jar)
  • Oracles JDBC implementation for Java version 1.4
    or later is required to use the JDBC API to
    interact with Oracle (i.e. ojdbc14.jar)
  • Both jars (i.e. interface and implementation)
    must be within the programs executable path to
    function correctly.

12
The Java Platform (continued)
  • Examples of native implementation libraries
    resident within Java platform
  • Input / Output
  • Math
  • Native Interface (JNI)
  • JNI enables applications written in C/C to
    interoperate with Java applications on the same
    machine
  • C/C can initiate a JVM within its thread of
    execution, start a Java application, and receive
    a result
  • Java application can call C/C application and
    receive a result
  • JNI is significant because it enables legacy
    C/C applications to benefit from Javas vast
    libraries / frameworks (e.g. web enablement of
    legacy applications)

13
The Java Platform (continued)
Figure 1-5 Java EE Server and Containers
JNI in Action
Any Legacy Supported Server
Memory Monitor consists of spawned concurrent
thread always running withinWeb Container
Legacy Adapter Service
C IMAN Main
C ITK Main
Start-up Thread of Execution (always running)
Java Native Interface
Java Virtual Machine
Apache Tomcat
Web Application
Memory Monitor
Service Call Thread of Execution spawned by
Tomcat Web Container(lives only for the
duration of the call)
Apache Tomcat
Java Native Interface
Only hand coded portions of framework
C PDM API
C Vendor API
Logical IP
14
The Java Platform (continued)
  • Java groups their API libraries into three
    categories
  • J2SE Standard Edition
  • J2EE Enterprise Edition (http//java.sun.com/j2ee
    /1.4/docs/api/index.html)
  • J2ME Micro Edition (http//java.sun.com/j2se/1.5
    .0/docs/api/index.html)
  • Not going to cover this this is really a
    platform in itself for programming on devices
    (e.g. cell phones) that have small memory
    footprints
  • J2SE
  • All of its APIs can run within the J2SE JVM
  • J2EE
  • Most of J2EEs APIs can run within the JVM
    shipped with J2SE
  • For example, Javas Messaging Service (JMS)
  • Those that cannot run in the JVM require the
    implementation of a J2EE Container to execute
  • Note that these containers run within the JVM
    shipped with the J2SE. Said another way J2EE
    does not ship a different JVM.

15
The Java Platform (continued)
  • One big weakness in the Java Platform
  • You should not use Java for real-time programming
    (i.e. when the time between programmatic
    operations is required to occur at predictable
    times)
  • Due to JVMs memory manager running concurrently
    at unpredictable times
  • To address this limitation, in January 2006 the
    JCP released a reference implementation and
    interface specification called the Real-time
    Specification for Java

16
J2EEs Logical Application Tiers
Figure 1-5 Java EE Server and Containers
Typical to find web and business tiers
consolidated with standard beans in lieu of EJBs
ApplicationClient
Browser
Client Tier
Servlet
JSP
Web Tier
EJB
JCA
EJB
JCA
Business Logic Tier
Legacy Application
Legacy Application
EIS Tier
Database
Database
Database / Legacy Tier
17
J2EE Logical Architecture
Figure 1-5 Java EE Server and Containers
Client Machine
Server Machine
Browser
Web Container
HTTP
Servlet
JSP
Server Machine
ApplicationClientContainer
HTTP
ApplicationClient
RMI / Direct
Database
JDBC
EJB Container
EJB
EJB
RMI / JMS / JCA
Legacy Application
JCA / JMS
Client application containers are typically based
on J2SE
18
J2EE Containers
  • Two types
  • Web Container Manages the execution of Java
    Server Pages (JSP) and servlet components
  • An example implementation is the Apache Software
    Foundations (ASF) Tomcat server.
  • Enterprise Java Bean Container Manages the
    execution of Enterprise Java Beans (EJBs)
  • Example implementations include Suns J2EE
    Application Server, JBoss, Oracle Application
    Server, IBMs WebSphere Application Server, BEA
    WebLogic
  • Both container types can be supported by a
    single J2EE Server
  • In examples above, only Tomcat is a pure web
    container

19
J2EE Containers (continued)
  • Containers are nothing more than J2SE
    applications running within a JVM
  • EJB Containers are useful because they handle
    transaction and state management, multithreading,
    resource lookup and pooling, and other complex
    low-level details
  • EJB Containers can generate the software
    necessary to persist / store an EJBs state within
    a database
  • Known as Container Managed Persistence (CMP)
  • EJBs can also manage their own persistence
  • Known as Bean Managed Persistance (BMP)

20
J2EE Containers (continued)
  • Think of J2EE Containers as frameworks to aid the
    application development and support processes
  • EBJ Container Pros and Cons
  • Pros
  • Better software reuse
  • Ability to isolate business logic and allow that
    logic to be reused from many different
    application client types (i.e. thin, rich)
  • Cons
  • Programmers must follow the containers rules
  • No management of EJB / servlet lifecycle
  • No management of resource pooling
  • No creation of threads
  • Performance complaints when using CMP
  • Complex to install, configure, support

21
J2EE Containers (continued)
  • A single container can support multiple J2EE
    applications concurrently
  • Process of loading an application into a
    container is known as deployment
  • Containers support the following actions on an
    application
  • Start
  • Stop
  • Deploy
  • Undeploy

22
J2EE Containers (continued)
  • Three types of EJBs
  • Session Beans
  • Associated with one EJB Client.
  • Created and destroyed by the particular EJB
    Client that is using it.
  • Can be stateful or stateless
  • Do not survive a system shutdown / restart cycle
  • Entity Beans
  • Always stateful
  • Bean may be shared by multiple EJB Clients.
  • States can be persisted across multiple
    invocations.
  • Survive a system shutdown / restart cycle
  • Message Driven Beans
  • Activated by the arrival of a message on a JMS
    queue

23
J2EE Containers (continued)
  • EJB Containers also support Resource Adapters
    that comply with Javas Connector Architecture
    (JCA)
  • Support access to legacy enterprise information
    systems (EIS) (e.g. SAP)
  • A resource adapter is a software component that
    allows a J2EE application to access and interact
    with the underlying resource manager of the EIS
    using socket level programming
  • Think of JCA as a thick adapter

24
J2EE Containers (continued)
  • Complexity of EJB containers has limited their
    widespread adoption
  • Takes careful planning and thought to leverage
    their services
  • JCA is still in its infancy some major
    application vendors (e.g. SAP) have provided
    implementations but the current thrust is toward
    SOA concepts using web services in lieu of
    thick adapters
  • JCAs technical architecture is more mature to
    web services from a quality point of view but
    market forces are dominating

25
Other Relevant Java Frameworks
  • Javas API for Web Services (JAX-WS)
  • Enables Java applications to be web service
    enabled
  • Auto-generates
  • Client bindings for Java to call another web
    service from a consumed Web Service Description
    Language (WSDL) document
  • Generates the WSDL document and associated
    request/response servlets from a Java API
    interface
  • Artifacts are deployed in the web container
  • Could also be used as a J2EE communication
    mechanism
  • Eliminates need for previous frameworks such as
    Apaches AXIS and JCA

26
Other Relevant Java Frameworks
  • Java Web Start
  • Provides a platform-independent, secure, and
    robust deployment technology via the web.
  • Full featured Java applications are launched on
    the client machine from a click in the browser
  • Unlike applets, downloaded application runs
    independently of the browser expect to see a
    more rich clients
  • Apaches Struts
  • Model, View, Controller (MVC) framework for the
    web tier
  • Apaches Another Neat Tool (ANT)
  • Platform independent build environment similar to
    Cs make
  • Much larger than make, can also work with C/C
    and .Net

27
Javas Communication Mechanisms
  • True Communication Protocols
  • HTTP / HTTPS / FTP/ REXEC / SMTP
  • Javas Remote Method of Invocation (RMI)
  • Enables Java applications / objects running
    within either a J2SE JVM or J2EE container to
    intercommunicate with another Java application /
    object in another J2SE JVM or J2EE container
  • Common Object Request Broker Architecture (CORBA)
  • Enables Java applications / objects running
    within either a J2SE JVM or J2EE container to
    intercommunicate with remote C/C applications
  • Javas Native Interface (JNI)

28
Javas Communication Mechanisms (continued)
  • APIs to vendor specific implementations
    (continued)
  • Javas Database Connectivity (JDBC)
  • Enables Java applications to communicate with
    databases (e.g. Oracle, SQLServer, DB2, Teradata,
    etc.) in a uniform way
  • Javas Messaging Service (JMS)
  • Enables Java applications to communicate with
    message oriented middleware providers (e.g. IBMs
    MQSeries, Oracles AQ, Tibco Rendezvous, Sonic
    Software, etc.) in a uniform way
  • Java Mail
  • Enables Java applications to communicate with
    mail servers using industry standards protocols
    like POP3, SMTP, and IMAP in a uniform way

29
Javas Communication Mechanisms (continued)
  • APIs to vendor specific implementations
    (continued)
  • Javas Naming and Directory Interface (JNDI)
  • Performs standard directory operations, such as
    associating attributes with objects and searching
    for objects using their attributes. Using JNDI, a
    Java application can store and retrieve any type
    of named Java object.
  • Independent of any specific implementation, Java
    applications can use JNDI to access multiple
    naming and directory services, including existing
    naming and directory services such as LDAP, NDS,
    DNS, and NIS. This allows Java applications to
    coexist with legacy applications and systems.

30
Javas Support for XML
  • Java API for XML Processing (JAXP)
  • Defines APIs for parsing and transformation of
    XML independent of implementation
  • Parsing concepts supported include
  • Converting XML document to a loosely defined Java
    object called the Document Object Model (DOM)
  • Simple API for XML Parsing (SAX) provides an
    event driven, push API to the programmer as XML
    entities are discovered
  • Streaming API for XML (StAX), provides an
    event-driven, pull API for reading and writing
    XML documents.
  • Apaches Xerces implementation supports parsing
    XML documents as either a DOM or via SAX
  • Enhancements in work to support StAX
  • Oracle and BEA have StAX parser implementations
    available
  • Transformation API called TRaX
  • Supports XML style sheet transformation language
    (XSLT)
  • Apaches Xalan project provides TRaX compliant
    XSLT implementation and also allows its XSLT to
    be extended via Java

31
Javas Support for XML (continued)
  • Java API for XML Binding (JAXB)
  • Binding is defined as the process of extracting
    XML content and instantiating a strongly typed
    Java object representation so that the XML can be
    programmatically manipulated
  • Supports two-way conversion
  • Given an XML document, creates Java object
    representation
  • Given a Java object representation, can produce
    an XML document
  • Requires an XML Schema to exist or be created
  • Custom mappings between XML entity names and Java
    class attributes are possible through Javas
    support for annotations

32
Javas Support for XML (continued)
  • Java API for XML Registries (JAXR) very similar
    to JNDI
  • Provides a uniform and standard Java API for
    accessing different kinds of XML Registries.
  • An XML registry is an enabling infrastructure for
    discovering Web services. Specifications
    include
  • OASIS ebXML Registry and Repository standard
  • UDDI, which is being developed by a vendor
    consortium (defacto standard)
  • Apaches Scout project provides an implementation
    and supports both ebXML and UDDI
  • Concept of service discovery is still in its
    infancy

33
Javas Support for XML (continued)
  • Apache has a unique project called XML Graphics
  • Supports the W3Cs XSL-FO language which
    describes how documents should be printed
  • Project ships an implementation that takes as
    input an XML document compliant with the XSL-FO
    language, passes it through an interpreter, and
    creates one of the following PDF, PCL, PS, SVG,
    Print, AWT, MIF and TXT
  • This is a powerful language for document creation
    from XML via the Java platform

34
Javas Support for XML (continued)
  • Cannot understate the importance of XML and
    Javas support for it
  • Enables creation of new fourth generation
    programming languages (4GLs) whose underlying
    engine is based on Java
  • Personally co-developed a language called XSQL
    (XML based Structured Query Language)

35
Javas Support for XML (continued)
  • Case Study Creation of XSQL 4GL
  • Enables the dynamic manipulation of Relational
    Database Management Systems (RDBMS) compliant
    with Javas Database Connectivity (JDBC) via
    feature rich, interpretative programming
    environment
  • Executes select, insert, update, and delete
    statements and stored procedures
  • Evaluates expressions addition, subtraction,
    multiplication, division, concatenation, etc.
  • Supports looping, variable declaration, etc.
  • Allows output of these statement calls to be used
    as inputs to subsequent calls
  • Outputs an XML document that represents the
    results of these statement executions

36
Javas Support for XML (continued)
  • Case Study Creation of XSQL 4GL

JDBC Compliant RDBMS
JDBCAPI
External System
XSLTInterpreter
XSQLInterpreter
RDBMS
XML
XML
XSQLSpec
ResultofInteraction
XSLT Spec
XMLDoc
Can be deployed into an Integration Broker
37
Javas Support for XML (continued)
  • Case Study Creation of XSQL 4GL
  • What an XSQL document looks like


select count() as count from
WDS61.IM_TABLE where PART
MTOCP1 condition"partExistance.COUNT0"
package-name"ENGINEERING_ADDPART"
schema-name"WDS61"

Test MES-MTO BOM Interface
nameUM" valueEA"/ name"PUR_MFG" value"M"/ value"L" name"PART_TYPE"/ name"DFLT_STKRM" value"54"/

Determining if Part Exists in application database
If Part does NOT exist, then add part to
application database using provided API
Hundreds of lines of Java code executed within a
typical statement hidden from XSQL developer and
systematically controlled in one place
38
Javas Support for XML (continued)
  • Case Study Creation of XSQL 4GL
  • What an XSQL output document looks like
  • Ouput document can then be sent back to the
    Integration Broker as a published message from
    the application

0

0
MTOCP1 EA
M L 54

39
Javas Support for Security
  • Javas provides robust security support but it is
    highly fragmented, redundant, and very complex to
    put into practice
  • Javas support for security is broken down into
    five areas
  • Platform Security represents the security
    features that are built into the language and are
    enforced by the Java compiler and virtual machine
  • Strong data typing
  • Automatic memory management
  • Byte code verification
  • Secure class loading

40
Javas Support for Security (continued)
  • Javas support for security is broken down into
    five areas
  • Authentication and Access Control via the
    following APIs
  • Javas Authentication and Authorization Service
    (JAAS) API
  • Javas Simple Authentication and Security Layer
    (SASL) API
  • Supports a secure, challenge / response protocol
    over the network
  • Policy and Permissions API
  • Enables the developer to create and administer
    applications requiring fine-grained user access
    to security-sensitive resources
  • Typically file based on permissions that sit
    within a hierarchical tree

41
Javas Support for Security (continued)
  • Javas support for security is broken down into
    five areas
  • Secure Communications
  • Java GSS-API Used for securely exchanging
    messages between communicating applications.
    Based on W3C RFC Generic Security Services
    Application Program Interface (GSS-API)
  • Java Secure Socket Extension (JSSE) API Enables
    secure Internet communications. It provides a
    framework and an implementation for a Java
    version of the SSL and TLS protocols and includes
    functionality for data encryption, server
    authentication, message integrity, and optional
    client authentication

42
Javas Support for Security (continued)
  • Javas support for security is broken down into
    five areas
  • Cryptography
  • Java Cryptography Architecture is a a framework
    for accessing and developing cryptographic
    functionality for the Java platform
  • Public Key Infrastructure Support
  • Java Certification Path API consists of classes
    and interfaces for handling certification paths
  • Java Certificate API provides classes and
    interfaces for parsing and managing certificates,
    certificate revocation lists (CRLs), and
    certification paths. It contains support for
    X.509 v3 certificates and X.509 v2 CRLs

43
Java Business Integration
  • Represents the future of Java in Enterprise
    Middleware
  • JBI is a framework for implementing an enterprise
    service bus to facilitate the collaboration
    between services and messages in a consistent
    manner
  • A Java Community Project called Open-ESB has
    been established to provide a reference
    implementation

44
Closing Thoughts on Java
  • Very robust platform can use the software
    platform to satisfy almost every conceivable
    middleware need
  • If a need is not delivered by Sun, the open
    source community (e.g. Apache Software
    Foundation) or Java Community Process satisfies
    the shortfall
  • Difficult technology to get your arms around as a
    developer compared to Microsoft
  • Many options exist to solve your need
  • Always evolving
  • Fragmented message and documentation
  • Best representative of the Open Source
    revolution
Write a Comment
User Comments (0)
About PowerShow.com