SlideShare a Scribd company logo
Database Component In Mule
Demo
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

More Related Content

PPTX
Database component in mule
PPTX
Until successful component in mule demo
PPTX
Mule Message Properties Component
PPTX
Send email attachment using smtp in mule esb
PPTX
Mule concepts connectors
PPTX
Database component in mule demo
PPTX
Choice component in mule
PPTX
Send email attachment using smtp in mule esb
Database component in mule
Until successful component in mule demo
Mule Message Properties Component
Send email attachment using smtp in mule esb
Mule concepts connectors
Database component in mule demo
Choice component in mule
Send email attachment using smtp in mule esb

What's hot (17)

PPTX
Mule esb
PPTX
Message properties component in mule
PPTX
Expression filter in Mule
PPTX
Creating restful api using mule esb
PPT
Maven introduction in Mule
PPTX
Send email attachment using smtp in mule esb
PPTX
MuleSoft ESB Composite Source
PPTX
File component in mule
PPT
Anypoint data gateway
PPTX
File component in mule demo
PPTX
Expression filter in Mule
PDF
Mule Integration Simplified
PPTX
Mule esb
PPTX
For each component in mule
PPTX
Stored procedure in Mule
PPTX
For each component in mule demo
PPTX
Configuration patterns in mule
Mule esb
Message properties component in mule
Expression filter in Mule
Creating restful api using mule esb
Maven introduction in Mule
Send email attachment using smtp in mule esb
MuleSoft ESB Composite Source
File component in mule
Anypoint data gateway
File component in mule demo
Expression filter in Mule
Mule Integration Simplified
Mule esb
For each component in mule
Stored procedure in Mule
For each component in mule demo
Configuration patterns in mule
Ad

Viewers also liked (15)

PPTX
Mule for each scope header collection
PDF
Ps week 12
PPTX
File types pro forma(1)
PPTX
Genre research country
PPTX
Mule esb made system integration easy
PPTX
Mule esb How to use Jackson in Object to Json converter
PDF
Resin Infiltration Technique
PDF
ACERTE NA ABERTURA: DICAS PARA CRIAR ASSUNTOS INFALÍVEIS!
PDF
TEMPLATE RESPONSIVO - CUIDADOS E APLICAÇÕES SIMPLES QUE FAZEM A DIFERENÇA
PDF
[TCC] Design Thinking aplicado ao Branding
PPT
Pontics in fpd
PPT
Ericsson Rbs 6201 commisioning (1)
DOC
Lebenslauf Ingenieur Jijiie,Daniel
PDF
What is Comms Planning?
Mule for each scope header collection
Ps week 12
File types pro forma(1)
Genre research country
Mule esb made system integration easy
Mule esb How to use Jackson in Object to Json converter
Resin Infiltration Technique
ACERTE NA ABERTURA: DICAS PARA CRIAR ASSUNTOS INFALÍVEIS!
TEMPLATE RESPONSIVO - CUIDADOS E APLICAÇÕES SIMPLES QUE FAZEM A DIFERENÇA
[TCC] Design Thinking aplicado ao Branding
Pontics in fpd
Ericsson Rbs 6201 commisioning (1)
Lebenslauf Ingenieur Jijiie,Daniel
What is Comms Planning?
Ad

Similar to Database component in mule (20)

PPTX
Database Component
PPTX
Basic example using database component
PPTX
How to use bean as datasource in database connector
PPTX
Bean as Datasource
PPTX
Mule new jdbc component
PPTX
Database Access in mule ESB
PPTX
Database integrate with mule
PPTX
Mule jdbc
PPT
Mule database connector
PPTX
PPTX
Integrate with database by groovy
PPTX
Mule ESB Components
PPTX
Muleesbcomponents1 160625154208
PPTX
Calling database with groovy in mule
PPTX
Mule esb – connecting to ms sql db
PPT
Mule database-connectors
PPT
MuleSoft Database Connector
PPT
Mule database-connectors
PPT
Mule database-connectors
PPT
Mule database-connectors
Database Component
Basic example using database component
How to use bean as datasource in database connector
Bean as Datasource
Mule new jdbc component
Database Access in mule ESB
Database integrate with mule
Mule jdbc
Mule database connector
Integrate with database by groovy
Mule ESB Components
Muleesbcomponents1 160625154208
Calling database with groovy in mule
Mule esb – connecting to ms sql db
Mule database-connectors
MuleSoft Database Connector
Mule database-connectors
Mule database-connectors
Mule database-connectors

More from javeed_mhd (20)

PPTX
For each component in mule
PPTX
Filter expression in mule
PPTX
File component in mule
PPTX
Choice component in mule
PPTX
Vm component in mule
PPTX
Until successful component in mule
PPTX
Quartz component in mule
PPTX
Mule management console installation
PPTX
Junit in mule demo
PPTX
How to install sonarqube plugin in anypoint
PPTX
How to commit a project in svn using svn plugin in anypointstudio
PPTX
Mapping and listing with mule
PPT
Mule any point exchange
PPT
Mule esb api layer
PDF
Mule Maven Plugin
PPTX
Mule esb stripe
PPTX
Mule with stored procedure
PPTX
Deploying and running in mule standalone
PPTX
Presentation
PPTX
Scatter gather in mule
For each component in mule
Filter expression in mule
File component in mule
Choice component in mule
Vm component in mule
Until successful component in mule
Quartz component in mule
Mule management console installation
Junit in mule demo
How to install sonarqube plugin in anypoint
How to commit a project in svn using svn plugin in anypointstudio
Mapping and listing with mule
Mule any point exchange
Mule esb api layer
Mule Maven Plugin
Mule esb stripe
Mule with stored procedure
Deploying and running in mule standalone
Presentation
Scatter gather in mule

Recently uploaded (20)

PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Electronic commerce courselecture one. Pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Modernizing your data center with Dell and AMD
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
DOCX
The AUB Centre for AI in Media Proposal.docx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Electronic commerce courselecture one. Pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Weekly Chronicles - August'25 Week I
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
A Presentation on Artificial Intelligence
Modernizing your data center with Dell and AMD
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
The AUB Centre for AI in Media Proposal.docx

Database component in mule

  • 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