Difference between revisions of "User:Ijam duo/data replication"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
('''JMS(JAVA MASSAGE SERVICE)''')
(Replication Module)
Line 1: Line 1:
 
== Replication Module ==
 
== Replication Module ==
Welcome to and thanks for your interest in this module, let's share the knowledge about this replication module how it works and done :)
+
Welcome to and thanks for your interest in this module, let's share the knowledge about this replication module how it works and done :),I'am written this topic according to the SUN tutorial on the JMS from SUN website.
 
==='''JMS(JAVA MASSAGE SERVICE)'''===
 
==='''JMS(JAVA MASSAGE SERVICE)'''===
  
Line 9: Line 9:
 
Messaging enables distributed communication that is loosely coupled. A component
 
Messaging enables distributed communication that is loosely coupled. A component
 
Sends a message to a destination, and the recipient can retrieve the message from the destination. However, the sender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and the receiver need to know only what message format and what destination to use. In this respect, messaging differs from tightly coupled technologies, such as Remote Method Invocation (RMI), which require an application to know a remote application’s methods. Messaging also differs from electronic mail (e-mail), which is a method of communication between people or between software applications and people. Messaging is used for communication between software applications or software components.
 
Sends a message to a destination, and the recipient can retrieve the message from the destination. However, the sender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and the receiver need to know only what message format and what destination to use. In this respect, messaging differs from tightly coupled technologies, such as Remote Method Invocation (RMI), which require an application to know a remote application’s methods. Messaging also differs from electronic mail (e-mail), which is a method of communication between people or between software applications and people. Messaging is used for communication between software applications or software components.
 +
 +
In Order to used this JMS, JDK 1.3.1 provide the JMS API(JAVA Message Service Application Programming Interface) but firstly we need to be familiar with JAVA programming, What is JMS API? Let we go through this shall we :)
 +
 +
==='''JMS API'''===
 +
 +
The Java Message Service is a Java API that allows applications to create, send, receive, and read messages. Designed by Sun and several partner companies, the JMS API defines a common set of interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations.
 +
 +
The JMS API minimizes the set of concepts a programmer must learn to use messaging products but provides enough features to support sophisticated messaging applications. It also strives to maximize the portability of JMS applications across JMS providers in the same messaging domain.
 +
 +
The JMS API enables communication that is not only loosely coupled but also
 +
*Asynchronous. A JMS provider can deliver messages to a client as they arrive; a client does not have to request messages in order to receive them.
 +
*Reliable. The JMS API can ensure that a message is delivered once and only once. Lower levels of reliability are available for applications that can afford to miss messages or to receive duplicate messages.
 +
 +
The JMS Specification was first published in August 1998. The latest version of the JMS Specification is Version 1.0.2b, which was released in August 2001. You can download a copy of the Specification from the JMS Web site, http://java.sun.com/products/jms/.
 +
 +
=== Advantages of JMS ===
 +
Now we know a bit about JMS API but WHY JMS API?
 +
 +
It is because JMS allowing loosely coupled, reliable, asynchronous interactions among J2EE components and legacy systems capable of messaging. A developer can easily add new behavior to a J2EE application with existing business events by adding a new message-driven bean to operate on specific business events. The J2EE platform’s EJB container architecture, moreover, enhances the JMS API by providing support for distributed transactions and allowing for the concurrent consumption of messages
 +
 +
Here is the others features of JMS:
 +
*Application clients, Enterprise JavaBeans (EJB™) components, and Web components can send or synchronously receive a JMS message. Application clients can in addition receive JMS messages asynchronously. (Applets, however, are not required to support the JMS API.)
 +
*A new kind of enterprise bean, the message-driven bean, enables the asynchronous consumption of messages. A JMS provider may optionally implement concurrent processing of messages by message-driven beans.
 +
*Message sends and receives can participate in distributed transactions.

Revision as of 10:37, 28 January 2008

Replication Module

Welcome to and thanks for your interest in this module, let's share the knowledge about this replication module how it works and done :),I'am written this topic according to the SUN tutorial on the JMS from SUN website.

JMS(JAVA MASSAGE SERVICE)

OVERVIEW

As I mention earlier the core of data replication module for adempiere to make it come to live is by using the JMS (Java Massage Service) which is interesting method in J2EE. This method used a messaging method to communicate between either software or applications. This method used peer-to-peer facility: A messaging client can send messages to, and receive messages from, any other client. Each client connects to a messaging agent that provides facilities for creating, sending, receiving, and reading messages.

Messaging enables distributed communication that is loosely coupled. A component Sends a message to a destination, and the recipient can retrieve the message from the destination. However, the sender and the receiver do not have to be available at the same time in order to communicate. In fact, the sender does not need to know anything about the receiver; nor does the receiver need to know anything about the sender. The sender and the receiver need to know only what message format and what destination to use. In this respect, messaging differs from tightly coupled technologies, such as Remote Method Invocation (RMI), which require an application to know a remote application’s methods. Messaging also differs from electronic mail (e-mail), which is a method of communication between people or between software applications and people. Messaging is used for communication between software applications or software components.

In Order to used this JMS, JDK 1.3.1 provide the JMS API(JAVA Message Service Application Programming Interface) but firstly we need to be familiar with JAVA programming, What is JMS API? Let we go through this shall we :)

JMS API

The Java Message Service is a Java API that allows applications to create, send, receive, and read messages. Designed by Sun and several partner companies, the JMS API defines a common set of interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations.

The JMS API minimizes the set of concepts a programmer must learn to use messaging products but provides enough features to support sophisticated messaging applications. It also strives to maximize the portability of JMS applications across JMS providers in the same messaging domain.

The JMS API enables communication that is not only loosely coupled but also

  • Asynchronous. A JMS provider can deliver messages to a client as they arrive; a client does not have to request messages in order to receive them.
  • Reliable. The JMS API can ensure that a message is delivered once and only once. Lower levels of reliability are available for applications that can afford to miss messages or to receive duplicate messages.

The JMS Specification was first published in August 1998. The latest version of the JMS Specification is Version 1.0.2b, which was released in August 2001. You can download a copy of the Specification from the JMS Web site, http://java.sun.com/products/jms/.

Advantages of JMS

Now we know a bit about JMS API but WHY JMS API?

It is because JMS allowing loosely coupled, reliable, asynchronous interactions among J2EE components and legacy systems capable of messaging. A developer can easily add new behavior to a J2EE application with existing business events by adding a new message-driven bean to operate on specific business events. The J2EE platform’s EJB container architecture, moreover, enhances the JMS API by providing support for distributed transactions and allowing for the concurrent consumption of messages

Here is the others features of JMS:

  • Application clients, Enterprise JavaBeans (EJB™) components, and Web components can send or synchronously receive a JMS message. Application clients can in addition receive JMS messages asynchronously. (Applets, however, are not required to support the JMS API.)
  • A new kind of enterprise bean, the message-driven bean, enables the asynchronous consumption of messages. A JMS provider may optionally implement concurrent processing of messages by message-driven beans.
  • Message sends and receives can participate in distributed transactions.