SlideShare une entreprise Scribd logo
1  sur  8
DataBase Component
15-12-2015
Abstract
• The main motto of this PPT is how to use
Database component in our applications.
Introduction
• The Database connector allows you to
connect with almost any Java Database
Connectivity (JDBC) relational database using
a single interface for every case. The Database
connector allows you to run diverse SQL
operations on your database, including Select,
Insert, Update, Delete, and even Stored
Procedures.
Example
• .mflow
• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
• http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
• http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
• http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd">
• <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user=“**" password=“****" url="jdbc:sqlserver://localhost;databaseName=test1"
transactionIsolation="UNSPECIFIED" doc:name="MS SQL Data Source"/>
• <jdbc-ee:connector name="Database" dataSource-ref="MS_SQL_Data_Source" validateConnections="true" queryTimeout="-1"
pollingFrequency="0" doc:name="Database"/>
• <flow name="Database_ComponentFlow1" doc:name="Database_ComponentFlow1">
• <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="database" doc:name="HTTP"/>
• <logger message="--main flow--" level="INFO" doc:name="Logger"/>
• <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="select" queryTimeout="-1" connector-ref="Database"
doc:name="Database">
• <jdbc-ee:query key="select" value="select * from mytable"/>
• </jdbc-ee:outbound-endpoint>
• <logger message="--Result is--#[payload]" level="INFO" doc:name="Logger"/>
• </flow>
• </mule>
• Output:
• INFO 2015-10-03 17:34:29,440 [[Database Component].config.change.2.thread.1] org.mule.DefaultMuleContext:
• **********************************************************************
• * Application: Database Component *
• * OS encoding: Cp1252, Mule encoding: UTF-8 *
• * *
• * Agents Running: *
• * Clustering Agent *
• * JMX Agent *
• **********************************************************************
• INFO 2015-10-03 17:34:29,441 [[Database Component].config.change.2.thread.1]
org.mule.module.launcher.MuleDeploymentService:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Started app 'Database Component' +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2015-10-03 17:34:35,704 [[Database Component].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --main flow--
• INFO 2015-10-03 17:34:35,705 [[Database Component].connector.http.mule.default.receiver.02]
org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Database.dispatcher.1030403796'. Object is:
EEJdbcMessageDispatcher
• INFO 2015-10-03 17:34:35,705 [[Database Component].connector.http.mule.default.receiver.02]
org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Database.dispatcher.1030403796'. Object is:
EEJdbcMessageDispatcher
• INFO 2015-10-03 17:34:35,815 [[Database Component].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --Result is--[{subj=Hindi, marks=55, name=Ramesh, id=1},
{subj=English, marks=65, name=Mahesh, id=2}, {subj=science, marks=75, name=Pavan, id=3}, {subj=social,
marks=45, name=Siva, id=4}]
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8087/database
2. Database component connects to the specific
database, executes the select query and prints
the result
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.7/database-connector

Contenu connexe

Tendances

Tendances (19)

Splitter
SplitterSplitter
Splitter
 
Validation
ValidationValidation
Validation
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
 
Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
 
Until Successful Component
Until Successful ComponentUntil Successful Component
Until Successful Component
 
How to use data mapper transformer
How to use data mapper transformerHow to use data mapper transformer
How to use data mapper transformer
 
Basic example using database component
Basic example using database componentBasic example using database component
Basic example using database component
 
How to use smtp endpoint
How to use smtp endpointHow to use smtp endpoint
How to use smtp endpoint
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
 
How to use until successful component
How to use until successful componentHow to use until successful component
How to use until successful component
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
How to use parse template
How to use parse templateHow to use parse template
How to use parse template
 
Basic example using choice component
Basic example using choice componentBasic example using choice component
Basic example using choice component
 

En vedette

Health Total
Health TotalHealth Total
Health Total
AlisiaG
 
Maria Grazia maffucci presentazione relazionefinale
Maria Grazia maffucci   presentazione relazionefinaleMaria Grazia maffucci   presentazione relazionefinale
Maria Grazia maffucci presentazione relazionefinale
Maria Grazia Maffucci
 
I viaggi di passione avventura
I viaggi di passione avventuraI viaggi di passione avventura
I viaggi di passione avventura
Fabio Bonfante
 
Idea presentation for economics
Idea presentation for economics Idea presentation for economics
Idea presentation for economics
BritneyBondin
 
Maria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di datiMaria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci
 

En vedette (20)

Slideshare TP
Slideshare TPSlideshare TP
Slideshare TP
 
Jf bton-sm
Jf bton-smJf bton-sm
Jf bton-sm
 
Health Total
Health TotalHealth Total
Health Total
 
SITE-rminology
SITE-rminologySITE-rminology
SITE-rminology
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
Securing Systems of Engagement
Securing Systems of EngagementSecuring Systems of Engagement
Securing Systems of Engagement
 
Disol
DisolDisol
Disol
 
Internet Safety
Internet SafetyInternet Safety
Internet Safety
 
Maria Grazia maffucci presentazione relazionefinale
Maria Grazia maffucci   presentazione relazionefinaleMaria Grazia maffucci   presentazione relazionefinale
Maria Grazia maffucci presentazione relazionefinale
 
Disoluciones
DisolucionesDisoluciones
Disoluciones
 
SANT ENGINEERING COMPANY
SANT ENGINEERING COMPANYSANT ENGINEERING COMPANY
SANT ENGINEERING COMPANY
 
I viaggi di passione avventura
I viaggi di passione avventuraI viaggi di passione avventura
I viaggi di passione avventura
 
Idea presentation for economics
Idea presentation for economics Idea presentation for economics
Idea presentation for economics
 
Maria Grazia Maffucci - Analisi di una prova di valutazione
Maria Grazia Maffucci - Analisi di una prova di valutazioneMaria Grazia Maffucci - Analisi di una prova di valutazione
Maria Grazia Maffucci - Analisi di una prova di valutazione
 
File component
File componentFile component
File component
 
For Each Component
For Each ComponentFor Each Component
For Each Component
 
Maria Grazia Maffucci - relazione reti: progettazione per obiettivi
Maria Grazia Maffucci - relazione reti: progettazione per obiettiviMaria Grazia Maffucci - relazione reti: progettazione per obiettivi
Maria Grazia Maffucci - relazione reti: progettazione per obiettivi
 
Maria Grazia Maffucci- programmazione presentazione
Maria Grazia Maffucci- programmazione presentazioneMaria Grazia Maffucci- programmazione presentazione
Maria Grazia Maffucci- programmazione presentazione
 
Maria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di datiMaria Grazia Maffucci - relazione di basi di dati
Maria Grazia Maffucci - relazione di basi di dati
 
Internet Then and Now
Internet Then and NowInternet Then and Now
Internet Then and Now
 

Similaire à Database Component

Similaire à Database Component (20)

Database component
Database component Database component
Database component
 
Database component
Database component Database component
Database component
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Database component in mule demo
Database component in mule demoDatabase component in mule demo
Database component in mule demo
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
 
How to use wildcard filter
How to use wildcard filterHow to use wildcard filter
How to use wildcard filter
 
How to use jms outbound endpoint
How to use jms outbound endpointHow to use jms outbound endpoint
How to use jms outbound endpoint
 
How to use jms inbound endpoint
How to use jms inbound endpointHow to use jms inbound endpoint
How to use jms inbound endpoint
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connector
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
How to use or filter
How to use or filterHow to use or filter
How to use or filter
 
How to use and filter
How to use and filterHow to use and filter
How to use and filter
 
How to use not filter
How to use not filterHow to use not filter
How to use not filter
 
Data virtualization using polybase
Data virtualization using polybaseData virtualization using polybase
Data virtualization using polybase
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Message properties component
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
Message properties component
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Database Component

  • 2. Abstract • The main motto of this PPT is how to use Database component in our applications.
  • 3. Introduction • The Database connector allows you to connect with almost any Java Database Connectivity (JDBC) relational database using a single interface for every case. The Database connector allows you to run diverse SQL operations on your database, including Select, Insert, Update, Delete, and even Stored Procedures.
  • 5. • .mflow • <?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd • http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd • http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd"> • <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user=“**" password=“****" url="jdbc:sqlserver://localhost;databaseName=test1" transactionIsolation="UNSPECIFIED" doc:name="MS SQL Data Source"/> • <jdbc-ee:connector name="Database" dataSource-ref="MS_SQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/> • <flow name="Database_ComponentFlow1" doc:name="Database_ComponentFlow1"> • <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="database" doc:name="HTTP"/> • <logger message="--main flow--" level="INFO" doc:name="Logger"/> • <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="select" queryTimeout="-1" connector-ref="Database" doc:name="Database"> • <jdbc-ee:query key="select" value="select * from mytable"/> • </jdbc-ee:outbound-endpoint> • <logger message="--Result is--#[payload]" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  • 6. • Output: • INFO 2015-10-03 17:34:29,440 [[Database Component].config.change.2.thread.1] org.mule.DefaultMuleContext: • ********************************************************************** • * Application: Database Component * • * OS encoding: Cp1252, Mule encoding: UTF-8 * • * * • * Agents Running: * • * Clustering Agent * • * JMX Agent * • ********************************************************************** • INFO 2015-10-03 17:34:29,441 [[Database Component].config.change.2.thread.1] org.mule.module.launcher.MuleDeploymentService: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Started app 'Database Component' + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2015-10-03 17:34:35,704 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --main flow-- • INFO 2015-10-03 17:34:35,705 [[Database Component].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Database.dispatcher.1030403796'. Object is: EEJdbcMessageDispatcher • INFO 2015-10-03 17:34:35,705 [[Database Component].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Database.dispatcher.1030403796'. Object is: EEJdbcMessageDispatcher • INFO 2015-10-03 17:34:35,815 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --Result is--[{subj=Hindi, marks=55, name=Ramesh, id=1}, {subj=English, marks=65, name=Mahesh, id=2}, {subj=science, marks=75, name=Pavan, id=3}, {subj=social, marks=45, name=Siva, id=4}]
  • 7. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8087/database 2. Database component connects to the specific database, executes the select query and prints the result