SlideShare a Scribd company logo
 The main motto of this PPT is How to use
Bean as Datasource in Database connector in
our applications.
 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.
.mflow
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:context="http://www.springframework.org/schema/context" 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">
<spring:beans>
<spring:bean id="Bean1" name="Bean" class="org.enhydra.jdbc.standard.StandardDataSource">
<spring:property name="driverName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<spring:property name="url" value="jdbc:sqlserver://localhost:1433;databaseName=test1;user=*****;password=******"/>
</spring:bean>
</spring:beans>
<jdbc-ee:connector name="Database" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"
dataSource-ref="Bean1"/>
<context:property-placeholder location="file:${mule_home}/conf/esb-ecomm-details.properties,file:${mule_home}/conf/esb-soa-vmes-
db.properties,file:${mule_home}/conf/esb-ecom-sf-query-details.properties,file:${mule_home}/conf/esb-ecom-
error.properties,file:${mule_home}/conf/esb-vpdm-details.properties"/>
<flow name="DataBase_BeanFlow1" doc:name="DataBase_BeanFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" doc:name="HTTP" path="dbtest"/>
<logger message="--entered" 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="--after db--#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
 Output:
 INFO 2015-12-12 05:49:03,286 [main] org.mule.DefaultMuleContext:
 **********************************************************************
 * Application: database_bean *
 * OS encoding: Cp1252, Mule encoding: UTF-8 *
 * *
 * Agents Running: *
 * Clustering Agent *
 * JMX Agent *
 **********************************************************************
 INFO 2015-12-12 05:49:03,288 [main] org.mule.module.launcher.MuleDeploymentService:
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++
 + Started app 'database_bean' +
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++
 INFO 2015-12-12 05:49:42,464 [[database_bean].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --entered
 INFO 2015-12-12 05:49:42,473 [[database_bean].connector.http.mule.default.receiver.02]
org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Database.dispatcher.543460185'.
Object is: EEJdbcMessageDispatcher
 INFO 2015-12-12 05:49:42,474 [[database_bean].connector.http.mule.default.receiver.02]
org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Database.dispatcher.543460185'. Object
is: EEJdbcMessageDispatcher
 INFO 2015-12-12 05:49:42,770 [[database_bean].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --after db--[{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:8089/dbtest
2. Database component connects to the specific
database, executes the select query and prints
the result
 https://docs.mulesoft.com/mule-user-
guide/v/3.7/database-connector

More Related Content

What's hot

How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
mdfkhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
maheshtheapex
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
Mohammed246
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
Khan625
 
Expression Filters
Expression FiltersExpression Filters
Expression Filters
Durga Prasad Kakarla
 
How to use jms outbound endpoint
How to use jms outbound endpointHow to use jms outbound endpoint
How to use jms outbound endpoint
sivachandra mandalapu
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
RaviRajuRamaKrishna
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
RaviRajuRamaKrishna
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
Rajkattamuri
 
How to use expression filter
How to use expression filter How to use expression filter
How to use expression filter
Praneethchampion
 

What's hot (10)

How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Expression Filters
Expression FiltersExpression Filters
Expression Filters
 
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 splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
How to use expression filter
How to use expression filter How to use expression filter
How to use expression filter
 

Viewers also liked

How to use secure property placeholder
How to use secure property placeholderHow to use secure property placeholder
How to use secure property placeholder
sivachandra mandalapu
 
Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
sivachandra mandalapu
 
Splitter
SplitterSplitter
How to use SFTP
How to use SFTPHow to use SFTP
How to use SFTP
sivachandra mandalapu
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
sivachandra mandalapu
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
sivachandra mandalapu
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
sivachandra mandalapu
 
Sap
SapSap
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
sivachandra mandalapu
 
Expression
ExpressionExpression
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
sivachandra mandalapu
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api access
sivachandra mandalapu
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
sivachandra mandalapu
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
sivachandra mandalapu
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
sivachandra mandalapu
 
Data Mapper
Data MapperData Mapper

Viewers also liked (16)

How to use secure property placeholder
How to use secure property placeholderHow to use secure property placeholder
How to use secure property placeholder
 
Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
 
Splitter
SplitterSplitter
Splitter
 
How to use SFTP
How to use SFTPHow to use SFTP
How to use SFTP
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
 
Sap
SapSap
Sap
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
 
Expression
ExpressionExpression
Expression
 
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api access
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
 
Data Mapper
Data MapperData Mapper
Data Mapper
 

Similar to Bean as Datasource

Database component in mule demo
Database component in mule demoDatabase component in mule demo
Database component in mule demo
Sudha Ch
 
How to use bean as datasource in database connector
How to use bean as datasource in database connectorHow to use bean as datasource in database connector
How to use bean as datasource in database connector
RaviRajuRamaKrishna
 
Database Component
Database ComponentDatabase Component
Database Component
Durga Prasad Kakarla
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
Rajkattamuri
 
Database component
Database component Database component
Database component
Sunil Komarapu
 
Database component
Database component Database component
Database component
F K
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
javeed_mhd
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
AbdulImrankhan7
 
Basic example using database component
Basic example using database componentBasic example using database component
Basic example using database component
prudhvivreddy
 
Message properties component in mule demo
Message properties component in mule demoMessage properties component in mule demo
Message properties component in mule demo
Sudha Ch
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
Khan625
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
Durga Prasad Kakarla
 
How to use data mapper transformer
How to use data mapper transformerHow to use data mapper transformer
How to use data mapper transformer
maheshtheapex
 
How to use wildcard filter
How to use wildcard filterHow to use wildcard filter
How to use wildcard filter
RaviRajuRamaKrishna
 
How to use data weave
How to use data weaveHow to use data weave
How to use data weave
sivachandra mandalapu
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
akshay yeluru
 
How to use data mapper transformer
How to use data mapper transformerHow to use data mapper transformer
How to use data mapper transformer
RaviRajuRamaKrishna
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
prudhvivreddy
 
How to use jms inbound endpoint
How to use jms inbound endpointHow to use jms inbound endpoint
How to use jms inbound endpoint
sivachandra mandalapu
 
Message properties component
Message properties component Message properties component
Message properties component
Sunil Komarapu
 

Similar to Bean as Datasource (20)

Database component in mule demo
Database component in mule demoDatabase component in mule demo
Database component in mule demo
 
How to use bean as datasource in database connector
How to use bean as datasource in database connectorHow to use bean as datasource in database connector
How to use bean as datasource in database connector
 
Database Component
Database ComponentDatabase Component
Database Component
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Database component
Database component Database component
Database component
 
Database component
Database component Database component
Database component
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
 
Basic example using database component
Basic example using database componentBasic example using database component
Basic example using database component
 
Message properties component in mule demo
Message properties component in mule demoMessage properties component in mule demo
Message properties component in mule demo
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
How to use data mapper transformer
How to use data mapper transformerHow to use data mapper transformer
How to use data mapper transformer
 
How to use wildcard filter
How to use wildcard filterHow to use wildcard filter
How to use wildcard filter
 
How to use data weave
How to use data weaveHow to use data weave
How to use data weave
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
 
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 for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 
How to use jms inbound endpoint
How to use jms inbound endpointHow to use jms inbound endpoint
How to use jms inbound endpoint
 
Message properties component
Message properties component Message properties component
Message properties component
 

More from sivachandra mandalapu

Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
sivachandra mandalapu
 
Jms selector
Jms selectorJms selector
Jms selector
sivachandra mandalapu
 
Sftplite
SftpliteSftplite
Object store
Object storeObject store
Object store
sivachandra mandalapu
 
Soap Component
Soap ComponentSoap Component
Soap Component
sivachandra mandalapu
 
Rest Component
Rest ComponentRest Component
Rest Component
sivachandra mandalapu
 
Integration with dropbox using mule esb
Integration with dropbox using mule esbIntegration with dropbox using mule esb
Integration with dropbox using mule esb
sivachandra mandalapu
 
Integration of mule esb with microsoft azure
Integration of mule esb with microsoft azureIntegration of mule esb with microsoft azure
Integration of mule esb with microsoft azure
sivachandra mandalapu
 
Not Filter
Not FilterNot Filter

More from sivachandra mandalapu (9)

Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
 
Jms selector
Jms selectorJms selector
Jms selector
 
Sftplite
SftpliteSftplite
Sftplite
 
Object store
Object storeObject store
Object store
 
Soap Component
Soap ComponentSoap Component
Soap Component
 
Rest Component
Rest ComponentRest Component
Rest Component
 
Integration with dropbox using mule esb
Integration with dropbox using mule esbIntegration with dropbox using mule esb
Integration with dropbox using mule esb
 
Integration of mule esb with microsoft azure
Integration of mule esb with microsoft azureIntegration of mule esb with microsoft azure
Integration of mule esb with microsoft azure
 
Not Filter
Not FilterNot Filter
Not Filter
 

Recently uploaded

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
Kavitha Krishnan
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 

Recently uploaded (20)

writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Assessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptxAssessment and Planning in Educational technology.pptx
Assessment and Planning in Educational technology.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 

Bean as Datasource

  • 1.
  • 2.  The main motto of this PPT is How to use Bean as Datasource in Database connector in our applications.
  • 3.  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.
  • 4.
  • 5. .mflow <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:context="http://www.springframework.org/schema/context" 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"> <spring:beans> <spring:bean id="Bean1" name="Bean" class="org.enhydra.jdbc.standard.StandardDataSource"> <spring:property name="driverName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <spring:property name="url" value="jdbc:sqlserver://localhost:1433;databaseName=test1;user=*****;password=******"/> </spring:bean> </spring:beans> <jdbc-ee:connector name="Database" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database" dataSource-ref="Bean1"/> <context:property-placeholder location="file:${mule_home}/conf/esb-ecomm-details.properties,file:${mule_home}/conf/esb-soa-vmes- db.properties,file:${mule_home}/conf/esb-ecom-sf-query-details.properties,file:${mule_home}/conf/esb-ecom- error.properties,file:${mule_home}/conf/esb-vpdm-details.properties"/> <flow name="DataBase_BeanFlow1" doc:name="DataBase_BeanFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" doc:name="HTTP" path="dbtest"/> <logger message="--entered" 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="--after db--#[payload]" level="INFO" doc:name="Logger"/> </flow> </mule>
  • 6.  Output:  INFO 2015-12-12 05:49:03,286 [main] org.mule.DefaultMuleContext:  **********************************************************************  * Application: database_bean *  * OS encoding: Cp1252, Mule encoding: UTF-8 *  * *  * Agents Running: *  * Clustering Agent *  * JMX Agent *  **********************************************************************  INFO 2015-12-12 05:49:03,288 [main] org.mule.module.launcher.MuleDeploymentService:  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++  + Started app 'database_bean' +  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++  INFO 2015-12-12 05:49:42,464 [[database_bean].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --entered  INFO 2015-12-12 05:49:42,473 [[database_bean].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Database.dispatcher.543460185'. Object is: EEJdbcMessageDispatcher  INFO 2015-12-12 05:49:42,474 [[database_bean].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Database.dispatcher.543460185'. Object is: EEJdbcMessageDispatcher  INFO 2015-12-12 05:49:42,770 [[database_bean].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --after db--[{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:8089/dbtest 2. Database component connects to the specific database, executes the select query and prints the result