SlideShare a Scribd company logo
1/82
2/82
Java Message Service (JMS)Java Message Service (JMS)
3/82
What is JMS?What is JMS?
• A specification that describes a common way for Java
programs to create, send, receive and read distributed
enterprise messages
• loosely coupled communication
• Asynchronous messaging
• Reliable delivery
o A message is guaranteed to be delivered once and only
once.
• Outside the specification
o Security services
o Management services
4/82
A JMS ApplicationA JMS Application
• JMS Clients
o Java programs that send/receive messages
• Messages
• Administered Objects
o preconfigured JMS objects created by an admin
for the use of clients
o ConnectionFactory, Destination (queue or topic)
• JMS Provider
o messaging system that implements JMS and
administrative functionality
5/82
JMS AdministrationJMS Administration
Administrative
Tool JNDI Namespace
JMS Client JMS Provider
Bind
Lookup
Logical
Connection
6/82
JMS Messaging DomainsJMS Messaging Domains
• Point-to-Point (PTP)
o built around the concept of message queues
o each message has only one consumer
• Publish-Subscribe systems
o uses a “topic” to send and receive messages
o each message has multiple consumers
7/82
Point-to-Point MessagingPoint-to-Point Messaging
Client1 Client2Queue
sends
acknowledges
consumes
Msg
Msg
8/82
Publish/Subscribe MessagingPublish/Subscribe Messaging
Client1
Client2
publishes
subscribes
subscribes
Msg
Topic
Client3
delivers
delivers
9/82
Message ConsumptionsMessage Consumptions
• Synchronously
o A subscriber or a receiver explicitly fetches the message
from the destination by calling the receive method.
o The receive method can block until a message arrives or
can time out if a message does not arrive within a
specified time limit.
• Asynchronously
o A client can register a message listener with a consumer.
o Whenever a message arrives at the destination, the JMS
provider delivers the message by calling the listener's
onMessage() method.
10/82
JMS API Programming ModelJMS API Programming Model
Connection
creates creates
creates
MsgDestination
receives
from
sends to
Connection
Factory
Destination
Message
ConsumerSession
Message
Producer
creates
11/82
JMS Client ExampleJMS Client Example
• Setting up a connection and creating a session
InitialContext jndiContext=new InitialContext();
//look up for the connection factory
ConnectionFactory cf=jndiContext.lookup(connectionfactoryname);
//create a connection
Connection connection=cf.createConnection();
//create a session
Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
//create a destination object
Destination dest1=(Queue) jndiContext.lookup(“/jms/myQueue”); //for PointToPoint
Destination dest2=(Topic)jndiContext.lookup(“/jms/myTopic”); //for publish-subscribe
12/82
Producer SampleProducer Sample
• Setup connection and create a session
• Creating producer
MessageProducer producer=session.createProducer(dest1);
• Send a message
Message m=session.createTextMessage();
m.setText(“just another message”);
producer.send(m);
• Closing the connection
connection.close();
13/82
Consumer Sample (Synchronous)Consumer Sample (Synchronous)
• Setup connection and create a session
• Creating consumer
MessageConsumer consumer=session.createConsumer(dest1);
• Start receiving messages
connection.start();
Message m=consumer.receive();
14/82
Consumer Sample (Asynchronous)Consumer Sample (Asynchronous)
• Setup the connection, create a session
• Create consumer
• Registering the listener
o MessageListener listener=new myListener();
o consumer.setMessageListener(listener);
• myListener should have onMessage()
public void onMessage(Message msg){
//read the massage and do computation
}
15/82
Listener ExampleListener Example
public void onMessage(Message message) {
TextMessage msg = null;
try {
if (message instanceof TextMessage) {
msg = (TextMessage) message;
System.out.println("Reading message: " + msg.getText());
} else {
System.out.println("Message of wrong type: " +
message.getClass().getName());
}
} catch (JMSException e) {
System.out.println("JMSException in onMessage(): " + e.toString());
} catch (Throwable t) {
System.out.println("Exception in onMessage():" + t.getMessage());
}
}
16/82
JMS MessagesJMS Messages
• Message Header
o used for identifying and routing messages
o contains vendor-specified values, but could also
contain application-specific data
o typically name/value pairs
• Message Properties (optional)
• Message Body(optional)
o contains the data
o five different message body types in the JMS
specification
17/82
JMS Message TypesJMS Message Types
Message Type Contains Some Methods
TextMessage String getText,setText
MapMessage set of name/value pairs setString,setDouble,setLo
ng,getDouble,getString
BytesMessage stream of uninterpreted
bytes
writeBytes,readBytes
StreamMessage stream of primitive
values
writeString,writeDouble,
writeLong,readString
ObjectMessage serialize object setObject,getObject
18/82
More JMSMore JMS FeaturesFeatures
• Durable subscription
o by default a subscriber gets only messages
published on a topic while a subscriber is alive
o durable subscription retains messages until a
they are received by a subscriber or expire
• Request/Reply
o by creating temporary queues and topics
• Session.createTemporaryQueue()
o producer=session.createProducer(msg.getJMSReplyTo());
reply= session.createTextMessage(“reply”);
reply.setJMSCorrelationID(msg.getJMSMessageID);
producer.send(reply);
19/82
More JMS FeaturesMore JMS Features
• Transacted sessions
o session=connection.createSession(true,0)
o combination of queue and topic operation in one transaction is allowed
o void onMessage(Message m) {
try { Message m2=processOrder(m);
publisher.publish(m2); session.commit();
} catch(Exception e) { session.rollback(); }
20/82
More JMS FeaturesMore JMS Features
• Persistent/nonpersistent delivery
o producer.setDeliveryMethod(DeliveryMode.NON_PERSISTENT);
o producer.send(mesg, DeliveryMode.NON_PERSISTENT ,3,1000);
• Message selectors
o SQL-like syntax for accessing header:
subscriber = session.createSubscriber(topic, “priority > 6 AND type = ‘alert’ ”);
o Point to point: selector determines single
recipient
o Pub-sub: acts as filter
21/82
JMS API in a J2EE ApplicationJMS API in a J2EE Application
• Since the J2EE1.3 , the JMS API has
been an integral part of the platform
• J2EE components can use the JMS
API to send messages that can be
consumed asynchronously by a
specialized Enterprise Java Bean
o message-driven bean
22/82
Enterprise Java BeansEnterprise Java Beans
• EJB is a server-side component that encapsulates
the business logic of an application
• EJB simplifies the development of large,
distributed applications
o EJB Container provides system-level services
• e.g. transaction management, authorization
o Beans have the control logic
• thin client applications
o Portable components
• can run on any compliant J2EE server
23/82
Message–Driven BeanMessage–Driven Bean
• acts as a listener for the JMS, processing messages
asynchronously
• specialized adaptation of the JMS API used in the
context of J2EE applications
24/82
JMS with EJB ExampleJMS with EJB Example
25/82
MDB ExampleMDB Example
public class MB implements MessageDrivenBean, MessageListener{
public void ejbCreate(){}
public void ejbRemove(){}
public void setMessageDrivenContext(MessageDrivenContext mdc){}
pubic void onMessage(Message m){
//do computation on the incoming message
try{ if (m instanceof TextMessage)
System.out.println(“MBean: message”+m.getText());
}catch(JMSException exp){ ...}
}
}
26/82
JMS and JNDIJMS and JNDI
• JMS does not define a standard address syntax by
which clients communicate with each other
• Instead JMS utilizes Java Naming & Directory
Interface(JNDI).
• Using JNDI provides the following advantages:
o It hides provider-specific details from JMS clients.
o It abstracts JMS administrative information into Java
objects that are easily organized and administrated from a
common management console.
o Since there will be JNDI providers for all popular naming
services, this means JMS providers can deliver one
implementation of administered objects that will run
everywhere. Thereby eliminating deployment and
configuration issues.
27/82
SOAP and JMSSOAP and JMS
• Use JMS as a transportation layer for SOAP
• Example: Sun™ ONE Message Queue
o enables to send JMS messages that contain a
SOAP payload
o allowing transportation of SOAP messages
reliably and publishing SOAP messages to JMS
subscribers
o http://docs.sun.com/source/817-0355-
10/SOAP.html
28/82
SOAP and JMSSOAP and JMS
(using Sun™ ONE MQ)(using Sun™ ONE MQ)
• Send a SOAP message
o Create a JMS session
o Create a SOAP message
o Transfer the SOAP message into JMS message
Message myMsg= MessageTransformer.SOAPMessageIntoJMSMessage
(SOAPMessage, Session);
o Send the JMS message
29/82
SOAP and JMSSOAP and JMS
• Receive a SOAP message
o Create a JMS session
o Receive the JMS message
o Transfer the JMS message into SOAP message
SOAPMessage myMsg= MessageTransformer.SOAPMessageFromJMSMessage
(Message, MessageFactory);
30/82
SOAP and JMSSOAP and JMS
Deferring SOAP Processing
31/82
Publishing a SOAP message
32/82
JMS ProvidersJMS Providers
• SunONE Message Queue (SUN)
o a JMS provider integrated with the SunONE
Application Server
o http://www.sun.com
• MQ JMS (IBM)
o MQSeries is another messaging technology
o can configure MQ as a JMS provider
o (http://www7b.software.ibm.com/wsdd/library/t
echtip/0112_cox.html)
33/82
JMS ProvidersJMS Providers
• WebLogic JMS (BEA)
o enterprise-class messaging system integrated into
WebLogic Server
o http://dev2dev.bea.com/technologies/jms/inde
x.jsp
• JMSCourier (Codemesh)
o merging C++ applications into a JMS
environment
o http://www.codemesh.com/en/AlignTechnology
CaseStudy.html
34/82
ThankThank You !!!You !!!
For More Information click below link:
Follow Us on:
http://vibranttechnologies.co.in/weblogic-classes-in-mumbai.html

More Related Content

What's hot

Java Messaging Service
Java Messaging ServiceJava Messaging Service
Java Messaging Service
Dilip Prajapati
 
Jms
JmsJms
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
Peter R. Egli
 
JMS
JMSJMS
Jms using j boss
Jms using j bossJms using j boss
Jms using j boss
Skillwise Group
 
Java Message Service
Java Message ServiceJava Message Service
Java Message Service
AMIT YADAV
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
Vadym Lotar
 
Mom those things v1
Mom those things v1 Mom those things v1
Mom those things v1
von gosling
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
Sridhar Reddy
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
Bruce Snyder
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
Ryan Cuprak
 
Message Driven Beans (6)
Message Driven Beans (6)Message Driven Beans (6)
Message Driven Beans (6)
Abdalla Mahmoud
 
jms-integration
jms-integrationjms-integration
jms-integration
XAVIERCONSULTANTS
 
Swetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMBSwetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMB
shwetha mukka
 
Introduction tojms
Introduction tojmsIntroduction tojms
Introduction tojms
Maya Swamy
 

What's hot (15)

Java Messaging Service
Java Messaging ServiceJava Messaging Service
Java Messaging Service
 
Jms
JmsJms
Jms
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
 
JMS
JMSJMS
JMS
 
Jms using j boss
Jms using j bossJms using j boss
Jms using j boss
 
Java Message Service
Java Message ServiceJava Message Service
Java Message Service
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
 
Mom those things v1
Mom those things v1 Mom those things v1
Mom those things v1
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 
Message Driven Beans (6)
Message Driven Beans (6)Message Driven Beans (6)
Message Driven Beans (6)
 
jms-integration
jms-integrationjms-integration
jms-integration
 
Swetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMBSwetha-IBMCertifiedWMQ_WMB
Swetha-IBMCertifiedWMQ_WMB
 
Introduction tojms
Introduction tojmsIntroduction tojms
Introduction tojms
 

Viewers also liked

Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
Eduards Sizovs
 
Code Structural Analysis
Code Structural AnalysisCode Structural Analysis
Code Structural Analysis
Eduards Sizovs
 
Lessons Learned on Uber's Journey into Microservices
Lessons Learned on Uber's Journey into MicroservicesLessons Learned on Uber's Journey into Microservices
Lessons Learned on Uber's Journey into Microservices
C4Media
 
Architecting well-structured Java applications
Architecting well-structured Java applicationsArchitecting well-structured Java applications
Architecting well-structured Java applications
Eduards Sizovs
 
Software Craftsmanship Essentials
Software Craftsmanship EssentialsSoftware Craftsmanship Essentials
Software Craftsmanship Essentials
Eduards Sizovs
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
Muhammad Mansoor
 
An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)
Ambassador Labs
 
Java Concurrency in Practice
Java Concurrency in PracticeJava Concurrency in Practice
Java Concurrency in Practice
Alina Dolgikh
 
ETL Is Dead, Long-live Streams
ETL Is Dead, Long-live StreamsETL Is Dead, Long-live Streams
ETL Is Dead, Long-live Streams
C4Media
 
Engineering and Autonomy in the Age of Microservices - Nic Benders, New Relic
Engineering and Autonomy in the Age of Microservices - Nic Benders, New RelicEngineering and Autonomy in the Age of Microservices - Nic Benders, New Relic
Engineering and Autonomy in the Age of Microservices - Nic Benders, New Relic
Ambassador Labs
 
Microservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, StripeMicroservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, Stripe
Ambassador Labs
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer
 
WebLogic Deployment Plan Example
WebLogic Deployment Plan ExampleWebLogic Deployment Plan Example
WebLogic Deployment Plan Example
James Bayer
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
Mikalai Alimenkou
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
Ambassador Labs
 
Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
Rakesh Gujjarlapudi
 
From SOA to MSA
From SOA to MSAFrom SOA to MSA
From SOA to MSA
William Yang
 
Application Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at NetflixApplication Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at Netflix
MuleSoft
 
WebLogic JMS System Best Practices
WebLogic JMS System Best PracticesWebLogic JMS System Best Practices
WebLogic JMS System Best Practices
Trivadis
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService Architecture
Fred George
 

Viewers also liked (20)

Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Code Structural Analysis
Code Structural AnalysisCode Structural Analysis
Code Structural Analysis
 
Lessons Learned on Uber's Journey into Microservices
Lessons Learned on Uber's Journey into MicroservicesLessons Learned on Uber's Journey into Microservices
Lessons Learned on Uber's Journey into Microservices
 
Architecting well-structured Java applications
Architecting well-structured Java applicationsArchitecting well-structured Java applications
Architecting well-structured Java applications
 
Software Craftsmanship Essentials
Software Craftsmanship EssentialsSoftware Craftsmanship Essentials
Software Craftsmanship Essentials
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
 
An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)
 
Java Concurrency in Practice
Java Concurrency in PracticeJava Concurrency in Practice
Java Concurrency in Practice
 
ETL Is Dead, Long-live Streams
ETL Is Dead, Long-live StreamsETL Is Dead, Long-live Streams
ETL Is Dead, Long-live Streams
 
Engineering and Autonomy in the Age of Microservices - Nic Benders, New Relic
Engineering and Autonomy in the Age of Microservices - Nic Benders, New RelicEngineering and Autonomy in the Age of Microservices - Nic Benders, New Relic
Engineering and Autonomy in the Age of Microservices - Nic Benders, New Relic
 
Microservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, StripeMicroservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, Stripe
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
WebLogic Deployment Plan Example
WebLogic Deployment Plan ExampleWebLogic Deployment Plan Example
WebLogic Deployment Plan Example
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
 
Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
 
From SOA to MSA
From SOA to MSAFrom SOA to MSA
From SOA to MSA
 
Application Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at NetflixApplication Networks: Microservices and APIs at Netflix
Application Networks: Microservices and APIs at Netflix
 
WebLogic JMS System Best Practices
WebLogic JMS System Best PracticesWebLogic JMS System Best Practices
WebLogic JMS System Best Practices
 
MicroService Architecture
MicroService ArchitectureMicroService Architecture
MicroService Architecture
 

Similar to Weblogic - Introduction to configure JMS

Jms
JmsJms
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
Jms intro
Jms introJms intro
Jms intro
Manav Prasad
 
Test DB user
Test DB userTest DB user
Test DB user
techweb08
 
test validation
test validationtest validation
test validation
techweb08
 
Java Messaging Services
Java Messaging ServicesJava Messaging Services
Java Messaging Services
kumar gaurav
 
Messaging Frameworks using JMS
Messaging Frameworks using JMS Messaging Frameworks using JMS
Messaging Frameworks using JMS
Arvind Kumar G.S
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
EosSoftware
 
Server-side JS with NodeJS
Server-side JS with NodeJSServer-side JS with NodeJS
Server-side JS with NodeJS
Lilia Sfaxi
 
#7 (Java Message Service)
#7 (Java Message Service)#7 (Java Message Service)
#7 (Java Message Service)
Ghadeer AlHasan
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ Configuration
Ashish Mishra
 
JMSSession1TP-final.ppt
JMSSession1TP-final.pptJMSSession1TP-final.ppt
JMSSession1TP-final.ppt
Pavankumar374257
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
banq jdon
 

Similar to Weblogic - Introduction to configure JMS (20)

Jms
JmsJms
Jms
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
Jms intro
Jms introJms intro
Jms intro
 
Test DB user
Test DB userTest DB user
Test DB user
 
test validation
test validationtest validation
test validation
 
Java Messaging Services
Java Messaging ServicesJava Messaging Services
Java Messaging Services
 
Messaging Frameworks using JMS
Messaging Frameworks using JMS Messaging Frameworks using JMS
Messaging Frameworks using JMS
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
 
Server-side JS with NodeJS
Server-side JS with NodeJSServer-side JS with NodeJS
Server-side JS with NodeJS
 
#7 (Java Message Service)
#7 (Java Message Service)#7 (Java Message Service)
#7 (Java Message Service)
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ Configuration
 
JMSSession1TP-final.ppt
JMSSession1TP-final.pptJMSSession1TP-final.ppt
JMSSession1TP-final.ppt
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 

More from Vibrant Technologies & Computers

Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5
Vibrant Technologies & Computers
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
Vibrant Technologies & Computers
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
Vibrant Technologies & Computers
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
Vibrant Technologies & Computers
 
ITIL - introduction to ITIL
ITIL - introduction to ITILITIL - introduction to ITIL
ITIL - introduction to ITIL
Vibrant Technologies & Computers
 
Salesforce - Introduction to Security & Access
Salesforce -  Introduction to Security & Access Salesforce -  Introduction to Security & Access
Salesforce - Introduction to Security & Access
Vibrant Technologies & Computers
 
Data ware housing- Introduction to olap .
Data ware housing- Introduction to  olap .Data ware housing- Introduction to  olap .
Data ware housing- Introduction to olap .
Vibrant Technologies & Computers
 
Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.
Vibrant Technologies & Computers
 
Data ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housingData ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housing
Vibrant Technologies & Computers
 
Salesforce - classification of cloud computing
Salesforce - classification of cloud computingSalesforce - classification of cloud computing
Salesforce - classification of cloud computing
Vibrant Technologies & Computers
 
Salesforce - cloud computing fundamental
Salesforce - cloud computing fundamentalSalesforce - cloud computing fundamental
Salesforce - cloud computing fundamental
Vibrant Technologies & Computers
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
Vibrant Technologies & Computers
 
SQL- Introduction to advanced sql concepts
SQL- Introduction to  advanced sql conceptsSQL- Introduction to  advanced sql concepts
SQL- Introduction to advanced sql concepts
Vibrant Technologies & Computers
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
Vibrant Technologies & Computers
 
SQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set OperationsSQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set Operations
Vibrant Technologies & Computers
 
Sas - Introduction to designing the data mart
Sas - Introduction to designing the data martSas - Introduction to designing the data mart
Sas - Introduction to designing the data mart
Vibrant Technologies & Computers
 
Sas - Introduction to working under change management
Sas - Introduction to working under change managementSas - Introduction to working under change management
Sas - Introduction to working under change management
Vibrant Technologies & Computers
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
Vibrant Technologies & Computers
 
Teradata - Architecture of Teradata
Teradata - Architecture of TeradataTeradata - Architecture of Teradata
Teradata - Architecture of Teradata
Vibrant Technologies & Computers
 
Teradata - Restoring Data
Teradata - Restoring Data Teradata - Restoring Data
Teradata - Restoring Data
Vibrant Technologies & Computers
 

More from Vibrant Technologies & Computers (20)

Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5Buisness analyst business analysis overview ppt 5
Buisness analyst business analysis overview ppt 5
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
 
SQL- Introduction to MySQL
SQL- Introduction to MySQLSQL- Introduction to MySQL
SQL- Introduction to MySQL
 
SQL- Introduction to SQL database
SQL- Introduction to SQL database SQL- Introduction to SQL database
SQL- Introduction to SQL database
 
ITIL - introduction to ITIL
ITIL - introduction to ITILITIL - introduction to ITIL
ITIL - introduction to ITIL
 
Salesforce - Introduction to Security & Access
Salesforce -  Introduction to Security & Access Salesforce -  Introduction to Security & Access
Salesforce - Introduction to Security & Access
 
Data ware housing- Introduction to olap .
Data ware housing- Introduction to  olap .Data ware housing- Introduction to  olap .
Data ware housing- Introduction to olap .
 
Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.Data ware housing - Introduction to data ware housing process.
Data ware housing - Introduction to data ware housing process.
 
Data ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housingData ware housing- Introduction to data ware housing
Data ware housing- Introduction to data ware housing
 
Salesforce - classification of cloud computing
Salesforce - classification of cloud computingSalesforce - classification of cloud computing
Salesforce - classification of cloud computing
 
Salesforce - cloud computing fundamental
Salesforce - cloud computing fundamentalSalesforce - cloud computing fundamental
Salesforce - cloud computing fundamental
 
SQL- Introduction to PL/SQL
SQL- Introduction to  PL/SQLSQL- Introduction to  PL/SQL
SQL- Introduction to PL/SQL
 
SQL- Introduction to advanced sql concepts
SQL- Introduction to  advanced sql conceptsSQL- Introduction to  advanced sql concepts
SQL- Introduction to advanced sql concepts
 
SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data   SQL Inteoduction to SQL manipulating of data
SQL Inteoduction to SQL manipulating of data
 
SQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set OperationsSQL- Introduction to SQL Set Operations
SQL- Introduction to SQL Set Operations
 
Sas - Introduction to designing the data mart
Sas - Introduction to designing the data martSas - Introduction to designing the data mart
Sas - Introduction to designing the data mart
 
Sas - Introduction to working under change management
Sas - Introduction to working under change managementSas - Introduction to working under change management
Sas - Introduction to working under change management
 
SAS - overview of SAS
SAS - overview of SASSAS - overview of SAS
SAS - overview of SAS
 
Teradata - Architecture of Teradata
Teradata - Architecture of TeradataTeradata - Architecture of Teradata
Teradata - Architecture of Teradata
 
Teradata - Restoring Data
Teradata - Restoring Data Teradata - Restoring Data
Teradata - Restoring Data
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 

Weblogic - Introduction to configure JMS

  • 2. 2/82 Java Message Service (JMS)Java Message Service (JMS)
  • 3. 3/82 What is JMS?What is JMS? • A specification that describes a common way for Java programs to create, send, receive and read distributed enterprise messages • loosely coupled communication • Asynchronous messaging • Reliable delivery o A message is guaranteed to be delivered once and only once. • Outside the specification o Security services o Management services
  • 4. 4/82 A JMS ApplicationA JMS Application • JMS Clients o Java programs that send/receive messages • Messages • Administered Objects o preconfigured JMS objects created by an admin for the use of clients o ConnectionFactory, Destination (queue or topic) • JMS Provider o messaging system that implements JMS and administrative functionality
  • 5. 5/82 JMS AdministrationJMS Administration Administrative Tool JNDI Namespace JMS Client JMS Provider Bind Lookup Logical Connection
  • 6. 6/82 JMS Messaging DomainsJMS Messaging Domains • Point-to-Point (PTP) o built around the concept of message queues o each message has only one consumer • Publish-Subscribe systems o uses a “topic” to send and receive messages o each message has multiple consumers
  • 7. 7/82 Point-to-Point MessagingPoint-to-Point Messaging Client1 Client2Queue sends acknowledges consumes Msg Msg
  • 9. 9/82 Message ConsumptionsMessage Consumptions • Synchronously o A subscriber or a receiver explicitly fetches the message from the destination by calling the receive method. o The receive method can block until a message arrives or can time out if a message does not arrive within a specified time limit. • Asynchronously o A client can register a message listener with a consumer. o Whenever a message arrives at the destination, the JMS provider delivers the message by calling the listener's onMessage() method.
  • 10. 10/82 JMS API Programming ModelJMS API Programming Model Connection creates creates creates MsgDestination receives from sends to Connection Factory Destination Message ConsumerSession Message Producer creates
  • 11. 11/82 JMS Client ExampleJMS Client Example • Setting up a connection and creating a session InitialContext jndiContext=new InitialContext(); //look up for the connection factory ConnectionFactory cf=jndiContext.lookup(connectionfactoryname); //create a connection Connection connection=cf.createConnection(); //create a session Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE); //create a destination object Destination dest1=(Queue) jndiContext.lookup(“/jms/myQueue”); //for PointToPoint Destination dest2=(Topic)jndiContext.lookup(“/jms/myTopic”); //for publish-subscribe
  • 12. 12/82 Producer SampleProducer Sample • Setup connection and create a session • Creating producer MessageProducer producer=session.createProducer(dest1); • Send a message Message m=session.createTextMessage(); m.setText(“just another message”); producer.send(m); • Closing the connection connection.close();
  • 13. 13/82 Consumer Sample (Synchronous)Consumer Sample (Synchronous) • Setup connection and create a session • Creating consumer MessageConsumer consumer=session.createConsumer(dest1); • Start receiving messages connection.start(); Message m=consumer.receive();
  • 14. 14/82 Consumer Sample (Asynchronous)Consumer Sample (Asynchronous) • Setup the connection, create a session • Create consumer • Registering the listener o MessageListener listener=new myListener(); o consumer.setMessageListener(listener); • myListener should have onMessage() public void onMessage(Message msg){ //read the massage and do computation }
  • 15. 15/82 Listener ExampleListener Example public void onMessage(Message message) { TextMessage msg = null; try { if (message instanceof TextMessage) { msg = (TextMessage) message; System.out.println("Reading message: " + msg.getText()); } else { System.out.println("Message of wrong type: " + message.getClass().getName()); } } catch (JMSException e) { System.out.println("JMSException in onMessage(): " + e.toString()); } catch (Throwable t) { System.out.println("Exception in onMessage():" + t.getMessage()); } }
  • 16. 16/82 JMS MessagesJMS Messages • Message Header o used for identifying and routing messages o contains vendor-specified values, but could also contain application-specific data o typically name/value pairs • Message Properties (optional) • Message Body(optional) o contains the data o five different message body types in the JMS specification
  • 17. 17/82 JMS Message TypesJMS Message Types Message Type Contains Some Methods TextMessage String getText,setText MapMessage set of name/value pairs setString,setDouble,setLo ng,getDouble,getString BytesMessage stream of uninterpreted bytes writeBytes,readBytes StreamMessage stream of primitive values writeString,writeDouble, writeLong,readString ObjectMessage serialize object setObject,getObject
  • 18. 18/82 More JMSMore JMS FeaturesFeatures • Durable subscription o by default a subscriber gets only messages published on a topic while a subscriber is alive o durable subscription retains messages until a they are received by a subscriber or expire • Request/Reply o by creating temporary queues and topics • Session.createTemporaryQueue() o producer=session.createProducer(msg.getJMSReplyTo()); reply= session.createTextMessage(“reply”); reply.setJMSCorrelationID(msg.getJMSMessageID); producer.send(reply);
  • 19. 19/82 More JMS FeaturesMore JMS Features • Transacted sessions o session=connection.createSession(true,0) o combination of queue and topic operation in one transaction is allowed o void onMessage(Message m) { try { Message m2=processOrder(m); publisher.publish(m2); session.commit(); } catch(Exception e) { session.rollback(); }
  • 20. 20/82 More JMS FeaturesMore JMS Features • Persistent/nonpersistent delivery o producer.setDeliveryMethod(DeliveryMode.NON_PERSISTENT); o producer.send(mesg, DeliveryMode.NON_PERSISTENT ,3,1000); • Message selectors o SQL-like syntax for accessing header: subscriber = session.createSubscriber(topic, “priority > 6 AND type = ‘alert’ ”); o Point to point: selector determines single recipient o Pub-sub: acts as filter
  • 21. 21/82 JMS API in a J2EE ApplicationJMS API in a J2EE Application • Since the J2EE1.3 , the JMS API has been an integral part of the platform • J2EE components can use the JMS API to send messages that can be consumed asynchronously by a specialized Enterprise Java Bean o message-driven bean
  • 22. 22/82 Enterprise Java BeansEnterprise Java Beans • EJB is a server-side component that encapsulates the business logic of an application • EJB simplifies the development of large, distributed applications o EJB Container provides system-level services • e.g. transaction management, authorization o Beans have the control logic • thin client applications o Portable components • can run on any compliant J2EE server
  • 23. 23/82 Message–Driven BeanMessage–Driven Bean • acts as a listener for the JMS, processing messages asynchronously • specialized adaptation of the JMS API used in the context of J2EE applications
  • 24. 24/82 JMS with EJB ExampleJMS with EJB Example
  • 25. 25/82 MDB ExampleMDB Example public class MB implements MessageDrivenBean, MessageListener{ public void ejbCreate(){} public void ejbRemove(){} public void setMessageDrivenContext(MessageDrivenContext mdc){} pubic void onMessage(Message m){ //do computation on the incoming message try{ if (m instanceof TextMessage) System.out.println(“MBean: message”+m.getText()); }catch(JMSException exp){ ...} } }
  • 26. 26/82 JMS and JNDIJMS and JNDI • JMS does not define a standard address syntax by which clients communicate with each other • Instead JMS utilizes Java Naming & Directory Interface(JNDI). • Using JNDI provides the following advantages: o It hides provider-specific details from JMS clients. o It abstracts JMS administrative information into Java objects that are easily organized and administrated from a common management console. o Since there will be JNDI providers for all popular naming services, this means JMS providers can deliver one implementation of administered objects that will run everywhere. Thereby eliminating deployment and configuration issues.
  • 27. 27/82 SOAP and JMSSOAP and JMS • Use JMS as a transportation layer for SOAP • Example: Sun™ ONE Message Queue o enables to send JMS messages that contain a SOAP payload o allowing transportation of SOAP messages reliably and publishing SOAP messages to JMS subscribers o http://docs.sun.com/source/817-0355- 10/SOAP.html
  • 28. 28/82 SOAP and JMSSOAP and JMS (using Sun™ ONE MQ)(using Sun™ ONE MQ) • Send a SOAP message o Create a JMS session o Create a SOAP message o Transfer the SOAP message into JMS message Message myMsg= MessageTransformer.SOAPMessageIntoJMSMessage (SOAPMessage, Session); o Send the JMS message
  • 29. 29/82 SOAP and JMSSOAP and JMS • Receive a SOAP message o Create a JMS session o Receive the JMS message o Transfer the JMS message into SOAP message SOAPMessage myMsg= MessageTransformer.SOAPMessageFromJMSMessage (Message, MessageFactory);
  • 30. 30/82 SOAP and JMSSOAP and JMS Deferring SOAP Processing
  • 32. 32/82 JMS ProvidersJMS Providers • SunONE Message Queue (SUN) o a JMS provider integrated with the SunONE Application Server o http://www.sun.com • MQ JMS (IBM) o MQSeries is another messaging technology o can configure MQ as a JMS provider o (http://www7b.software.ibm.com/wsdd/library/t echtip/0112_cox.html)
  • 33. 33/82 JMS ProvidersJMS Providers • WebLogic JMS (BEA) o enterprise-class messaging system integrated into WebLogic Server o http://dev2dev.bea.com/technologies/jms/inde x.jsp • JMSCourier (Codemesh) o merging C++ applications into a JMS environment o http://www.codemesh.com/en/AlignTechnology CaseStudy.html
  • 34. 34/82 ThankThank You !!!You !!! For More Information click below link: Follow Us on: http://vibranttechnologies.co.in/weblogic-classes-in-mumbai.html

Editor's Notes

  1. 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. Lower levels of reliability are available for applications that can afford to miss messages or to receive duplicate messages. The JMS specification describes a set of programming interfaces that support distributed, enterprise messaging. An enterprise messaging systems enables independent distributed components or applications to interact through messages. These components, whether on the same system, the same network, or loosely connected through the Internet, use messaging to pass data and coordinate their respective functions. exposing only the JMS APIs is to hide the details from the users that want a higher-level API and also to ensure portability among implementations. As long as the vendor adheres to the JMS specification, a user shouldn't have to worry too much about how the implementation is constructed. By itself, it provides no functionality: the API or interfaces are separate from the implementation This gives the benefit of describing in detail what the user view should be, while at the same time allowing vendors to implement the details however they want. JMS is not an implementation of a message-oriented middleware. security and management are not the concerns of the JMS spec
  2. A JMS Application is one or more JMS clients that exchange messages asynchronously
  3. JNDI:java naming and directory service administrative tool allows you to bind cf,dest to jndi. Clients lookup the admin objects in the jndi and then establish a logical connection to the same objects through provider 2 types of administrative objects: connection factory, destination administrated objects are placed in a JNDI by admin. a JMS client notes in its documentation the JMS admin objects it requires and how the JNDI names of these objects should be provided to it. Connection factories are created by the server administrator and bound into the Java Naming and Directory Interface (JNDI) tree. A JMS client uses JNDI to look up the ConnectionFactory and then uses the ConnectionFactory to establish a JMS connection.
  4. A JMS Application is one or more JMS clients that exchange messages asynchronously. JMS deals with two kinds of message domains. - Point-to-Point (PTP) are built around the concept of message queues.     Publish-Subscribe systems use a “topic” to send and receive messages. Supports messages containing Java objects and XML pages.
  5. 1 consumer a sender and a receiver have no timing dependencies. the receiver can fetch the mesg whether or not it was running when client sent the msg receiver acknowledges
  6. multiple consumers publishers and subscribers have timing dependency. a client can consume only msgs published after its subscription and must continue to be active to consume msgs ( exception durable subscription)
  7. A message listener is similar to an event listener
  8. JMS Interfaces: connectionfactory: administrative object used by client to create a connection connection: an active connection for JMS provider destination: administrative object that encapsulates the identity of a message destination session: a single-threaded context for sending/receiving message messageproducer: an object created by a session that is used for sending msg to a dest messageconsumer: similar
  9. transacted session connection.createSession(true,0); AUTO_ACK: when client succesfully returned froma call to receive or when messagelistener returned successfully Client_ACK: a client acks a mesg by calling the message’s acknowledge() method ( consume 10 ack 5th, you acked for all 10) DUPS_ACK:dups are permitted, lazy ack (??)
  10. transacted session connection.createSession(true,0); AUTO_ACK: when client succesfully returned froma call to receive or when messagelistener returned successfully Client_ACK: a client acks a mesg by calling the message’s acknowledge() method ( consume 10 ack 5th, you acked for all 10) DUPS_ACK:dups are permitted, lazy ack (??)
  11. register the listener
  12. TextMessage m=session.createTextMessage();
  13. producer=session.createProducer(msg.getJMSReplyTo()); reply= session.createTextMessage(“reply”); reply.setJMSCorrelationID(msg.getJMSMessageID); producer.send(reply);
  14. send(msg,persistent, 3,100) 3: priority( default 4) 100: timeout (0 : no timeout)
  15. Since the 1.3 release of the J2EE platform ("the J2EE 1.3 platform"), the JMS API has been an integral part of the platform, and application developers can use messaging with components using J2EE APIs ("J2EE components"). J2EE Application server provides EJB, freeing applications from details of threading, transactions, scalability, fault-tolerance J2EE components (Web components or Enterprise JavaBeans (EJB) components) can use the JMS API to send messages that can be consumed asynchronously by a specialized EJB, called a message-driven bean (MDB). EJB is a server-side component that encapsulates the business logic of an application
  16. J2EE Application server provides EJB, freeing applications from details of threading, transactions, scalability, fault-tolerance J2EE components (Web components or Enterprise JavaBeans (EJB) components) can use the JMS API to send messages that can be consumed asynchronously by a specialized EJB, called a message-driven bean (MDB).
  17. EJB is a server-side component that encapsulates the business logic of an application
  18. EJB Container automatically performs several setup tasks that a standalone client has to do: -creating a msgconsumer instead, you associate the message-driven bean with a destination and connection factory at deployment time durable subscription, message selector : do at deployment -registering message listener -specifying message acknowledgment mode
  19. to create a new instance container calls -setmessagedrivencontext to pass the context object -then ejbcreate EJB Container automatically performs several setup tasks that a standalone client has to do: -creating a msgconsumer instead, you associate the message-driven bean with a destination and connection factory at deployment time durable subscription, message selector : do at deployment -registering message listener -specifying message acknowledgment mode
  20. Although a standard address syntax was considered, it was decided that the differences in address semantics between existing MOM products was too wide to bridge with a single syntax.
  21. In the first example, illustrated in Figure 5-9, an incoming SOAP message is received by a servlet. After receiving the SOAP message, the servlet MyServlet uses the MessageTransformer utility to transform the message into a JMS message, and (reliably) forwards it to an application that receives it, turns it back into a SOAP message, and processes the contents of the SOAP message http://docs.sun.com/source/817-0355-10/SOAP.html