+ All Categories
Home > Documents > ILP J2EE Stream J2EE 07 Othertech v0.3

ILP J2EE Stream J2EE 07 Othertech v0.3

Date post: 30-May-2018
Category:
Upload: chacko-mathew
View: 223 times
Download: 0 times
Share this document with a friend

of 22

Transcript
  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    1/22

    Overview of other J2EEtechnologiesVersion 1.0

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    2/22

    September 3, 2009TCS Internal

    Introduction

    The three primary components of J2EE

    application are:Servlet

    JSP

    EJBIn addition to these, J2EE provides additionaltechnologies which helps in building J2EEapplications.

    This session is an overview of all thesetechnologies.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    3/22

    September 3, 2009TCS Internal

    Technologies

    Java Messaging Service

    JavaMail

    JNDI

    JAAS

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    4/22

    September 3, 2009TCS Internal

    Java Messaging Service (JMS)

    JMS is a wrapper API that standardizes

    messaging functionality of other serviceproviders such as IBM MQSeries, etc.

    JMS does not provide any services directly.

    It facilitates to access messaging facilitiesprovided by different messaging-serviceprovider.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    5/22

    September 3, 2009TCS Internal

    Messaging

    Messaging is a means by which distributed

    applications communicate with each other.A message is a self-contained package ofbusiness data and routing headers.

    Message based applications communicateasynchronously through a message server.

    Services that support message-basedapplications are known as message-oriented

    middleware.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    6/22

    September 3, 2009TCS Internal

    JMS Features

    JMS supports clustered, high-availability

    message servers.JMS supports transaction to ensure thatrelated messages are either delivered

    together or not at all.JMS messages can be accessed/processedby message driven beans.

    JMS, unlike RMI helps create loosely coupled

    applications.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    7/22

    September 3, 2009TCS Internal

    Message Structure

    Headers

    Fixed set of metadata fields

    Properties

    Set of key-value pairs used for application

    specific purpose.Body

    The actual content to be sent.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    8/22

    September 3, 2009TCS Internal

    Message TypesByteMessage

    A stream of bytesMapMessage

    A set of key-value paiars

    ObjectMessageSerialized object instance

    StreamMessage

    A stream of primitives

    TextMessage

    A String instance

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    9/22

    September 3, 2009TCS Internal

    Types of Messaging

    Point-to-point messaging

    Messages send through queues.

    Only one consumer can consume amessage.

    Publish-and-subscribe messagingMessages are sent through topics.

    Many subscribers can consume messages.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    10/22

    September 3, 2009TCS Internal

    Message ComponentsDestinations

    Place where the message is sent.Specific type of destinations are queues

    (point-to-point systems) and topics(publish-subscribe) systems.

    Destinations are configured by messagingserver.

    Destinations are not created byapplication, but can be obtained by JNDIlookup.

    Connections

    This represents the connection between

    the application and messaging server overwhich messa es can be sent.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    11/22

    September 3, 2009TCS Internal

    Message Components (Contd.)Connection Factories

    Connections cannot be directlyinstantiated.

    Connection factory creates connectionobjects.

    Connection factory is found by JNDIlookup.

    Sessions

    Messages are not directly sent andreceived.

    Session serves as a factory which is usedby message, producers and consumers.

    Session provides transactional behavior

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    12/22

    September 3, 2009TCS Internal

    Message Components (Contd.)

    Producers

    Producers represent objects whichproduce message.

    Consumers

    Consumers represent objects whichconsumer message.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    13/22

    September 3, 2009TCS Internal

    Java Mail

    JavaMail API is an abstract suite of classes

    for handling message-based systems.JavaMail makes it easy to incorporatecomplete e-mail connectivity within any Javaprogram, Servlet, bean, or applet.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    14/22

    September 3, 2009TCS Internal

    Mail Protocols

    Protocols define the way mails are packages

    and sent.The three popular mail transfer protocolsare:

    SMTP (Simple Mail Transfer Protocol)Designed to deliver mails to server

    POP3 (Post Office Protocol Version 3)

    Popular mechanism to collect/read mails. Internet Message Access Protocol (IMAP)

    Rich set of functionalities.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    15/22

    September 3, 2009TCS Internal

    JavaMail FunctionsThe major functions of JavaMail API are:

    Session ManagementManages all aspects of communication

    Means for mail to interact with network

    Message ManipulationUsed to create and manipulate mails.

    Mail Storage and Retrieval

    Used to store mails in hierarchical

    structure.Transportation

    Takes care of delivery of mails.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    16/22

    September 3, 2009TCS Internal

    JAAS

    JAAS stands for Java Authentication and

    Authorization Services.JAAS is the security mechanism ofpreventing unauthorized users into J2EEapplication.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    17/22

    September 3, 2009TCS Internal

    JASS Mechanisms

    Authentication services

    These services ensure that every user isauthorized to use system and its resources

    This essentially matches with the

    underlying operating systems accessmechanism.

    Authorization services

    These services associate a set ofpermissions with each user.

    This helps in granting differing levels ofaccess to different users.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    18/22

    September 3, 2009TCS Internal

    JAAS Security Realms

    JAAS Security Realm is a logical grouping of

    users and services that make sense.It may be:

    Users using a particular machine

    Users working for a company / division /workgroup.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    19/22

    September 3, 2009TCS Internal

    JNDI

    Naming service essentially translates

    human-friendly names to machine-friendlynames.

    Normally these are called directory servicesassociating names as well as assign someadditional attributes.

    Directory services are important in networkinfrastructure, because they enable users

    and applications to look up networkresources.

    JNDI provides a set of API that providedirectory and naming services to Javaapplications.

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    20/22

    September 3, 2009TCS Internal

    JNDI Packages

    Naming

    Used to access simple naming services.

    Directory

    Used to access directory services.

    EventHandles event notification

    LDAP

    Deals with LDAP controls and operationsSPI

    Consists of Service Provider Interface (SPI)

    classes and interfaces used by LDAP

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    21/22

    September 3, 2009TCS Internal

    Java Transaction API (JTA)

    All transactions with the database should be

    atomic with ACID property.In normal applications local transactiontakes place which is easy to manage.

    In distributed applications, variousapplications will be involved in transactionand somebody should take care.

    JTA provides interface that can communicate

    with JTS (Java Transaction Service).

  • 8/14/2019 ILP J2EE Stream J2EE 07 Othertech v0.3

    22/22

    September 3, 2009TCS Internal

    Reference

    James Mc Govern, et. al., J2EE 1.4. Bible

    S Allamaraju, et. al., Professional Java ServerProgramming, J2EE 1.3 Ed.


Recommended