Вы находитесь на странице: 1из 5

1.

RMI:
 The Java Remote Method Invocation (RMI) system allows an object running
in one Java Virtual Machine (VM) to invoke methods on an object running in
another Java Virtual Machine.
 RMI functionalities come in a java.rmi package and provide a distributed
object capability for Java-based applications.
 RMI is the Java version of what is generally known as a remote procedure
call (RPC), but with the ability to pass one or more objects along with the
request. The object can include information that will change the service that is
performed in the remote computer.

RMI is implemented as three layers:


 A stub program in the client side of the client/server relationship, and a
corresponding skeleton at the server end. The stub appears to the calling
program to be the program being called for a service.

A Remote Reference Layer that can behave differently depending on the parameters
passed by the calling program. For example, this layer can determine whether the
request is to call a single remote service or multiple remote programs as in a multicast.

 A Transport Connection Layer, which sets up and manages the request.

2.EJB:
 EJB is an acronym for enterprise java bean. It is a specification provided by Sun
Microsystems to develop secured, robust and scalable distributed applications.
EJB application is deployed on the server, so it is called server side component.

 Why use EJBs?

Client communication, Session state management

Transaction management, Database connection management

User authentication and role-based authorization.


Session Bean: Session bean contains business logic that can be invoked by local,
remote or web service client.

Message Driven Bean:Like Session Bean, it contains the business logic but it is
invoked by passing message.

Entity Bean: It encapsulates the state that can be persisted in the database. It is
deprecated. Now, it is replaced with JPA (Java Persistent API).

Disadvantages of EJB
1. Requires application server
2. Requires only java client. For other language client, you need to go for web
service.
3. Complex to understand and develop ejb applications.

3.JNDI:
 NDI (Java Naming and Directory Interface) enables Java platform-based
applications to access multiple naming and directory services. Part of the
Java Enterprise application programming interface (API) set.

 JNDI makes it possible for developers to create portable applications that are
enabled for a number of different naming and directory services, including: file
systems; directory services such as LDAP and distributed object systems
such as Java Remote Method Invocation (RMI), and Enterprise JavaBeans
(EJB).

 JNDI implementation:-
LDAP: it is a lightweight version of DAP (Directory Access Protocol), which in turn is
part of X.500, a standard for network directory services
COS: Common Object Services Naming: The naming service for CORBA applications;
allows applications to store and access references to CORBA objects.
DNS: The Internet's naming service.

NIS. Network naming services, allow users to access files and applications on any
host with a single ID and password.
4.JTA:

 Java Transaction API (JTA) specifies standard Java interfaces between a


transaction manager and the parties involved in a distributed transaction
system
 Allows the applications to perform distributed transactions between one or
more systems connected to the network. The database access power is
greatly increased by supporting JTA in a JDBC driver.
 Allows applications to perform distributed transactions, that is, transactions
that access and update data on two or more networked computer resources.

JTA actually provides three types of services:


 Transactional operations in client applications
 Transactional operations in application servers performed on behalf of clients
 Global transactional management in a Java transaction manager coordinating
multiple transaction-capable resource managers such as database servers
and messaging systems .

Distributed transaction services typically involve a number of participants:


 Application Server:-Provides the infrastructure required to support an
application run-time environment which includes transaction state
management, such as an EJB server.
 Transaction Manager:-Provides the services and management functions
required to support transaction demarcation, transactional resource
management, synchronization, and transaction context propagation.
 Resource Manager:-Provides the application with access to resources. The
resource manager participates in distributed transactions by implementing a
transaction resource interface. The transaction manager uses this interface to
communicate transaction association, transaction completion, and recovery.
 Communication Resource Manager (CRM):- transaction context
propagation and access to the transaction service for incoming and outgoing
requests

5.JAAS:-

 The Java Authentication and Authorization Service (JAAS) is a set of


application program interfaces (APIs) that can determine the identity of a user
or computer attempting to run Java code and ensure that the entity has the
right to execute the functions requested.
 The JAAS authorization process extends the security policy to specify or
identify the privileges that have been granted to an entity attempting to to
execute a given code execute a given code. JAAS is independent of other
APIs and Technology.

JAAS can be used for two purposes:


 for authentication of users, to reliably and securely determine who is currently
executing Java code, regardless of whether the code is running as an
application, an applet, a bean, or a servlet; and
 for authorization of users to ensure they have the access control rights
(permissions) required to do the actions performed.

JAAS consists of two kinds of configuration file:

 *.login.conf: specifies how to plug vendor-supplied login modules into


particular applications
 *.policy: specifies which identities (users or programs) are granted which
permissions.

For the security system integrator, JAAS provides interfaces:

 to provide your identity namespace to applications


 to attach credentials to threads (Subject)
 for developing login modules.

6.JMS:-

 Java Message Service, JMS is a Sun Microsystems API that provides a


standard way for Java programs to access and interact with an enterprise
asynchronous messaging system. Used to write business applications to
create, send, receive, and read an enterprise messaging systems' messages.

With this in mind, the JMS message model has the following goals:

 Provide a single, unified message API .


 Provide an API suitable for creating messages that match the format used by
provider-native messaging applications.
 Support the development of heterogeneous applications that span operating
systems, machine architectures, and computer languages .
 Support messages containing objects in the Java programming language.
 Minimize the concepts a programmer must learn to use enterprise messaging.
 Maximize the portability of messaging applications.
 Minimize the work needed to implement a provider.

7.JAVA Mail:-

 The JavaMail API provides protocol-independent and plateform-independent


framework to compose, write and read electronic messages (emails).
 The javax.mail and javax.mail.activation packages contains the core classes
of JavaMail API.
Protocols used in JavaMail API

 SMTP: Simple Mail Transfer Protocol. It provides a mechanism to deliver


email. Apache James server, Postcast server, cmail server are used as Mail
server.
 POP: Post Office Protocol. POP is the mechanism most people on the
Internet use to get their mail. It defines support for a single mailbox for each
user.
 IMAP:- It provides support for multiple mailbox for each user, in addition to,
mailbox can be shared by multiple users.
 MIME:- it defines the content of what is transferred: the format of the
messages, attachments.

 javax.mail.Session class
 javax.mail.Message class
 javax.mail.internet.MimeMessage class
 javax.mail.Address class
 javax.mail.internet.InternetAddress classes are used.

Вам также может понравиться