This is the 4th part of my getting started demo for JBoss FUSE 6.2, an update from my old demo project. For people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project.
There is a series of blogs/videos, you can find the previous post here:
First part of demo was to take in and process the information, first we separates the 2 kinds of files, because they are handled differently. And send it to separate messaging broker.
Second demo was about processing the customer data, by reading the xml file and store it into a existing database table.
Third part starts to process housing data by getting number of schools surrounding the house address via SAAS.
Since we have the surrounding schools, we can now start to appraise the value of the house by the information provided, such as number of rooms, number of bathrooms, and even the size of the property. This business rule is built in a Java POJO, by calling the POJO with the data, it then calculate the actual value and store it into Database.
Here is the video,
In this demo, you will learn
SQL Endpoint
The sql component allows you to work with databases using JDBC queries. Also setting datasource for the sql component
Properties Place holder
Placing data into properties, to set base on different configurations.
Reference Java POJO bean in camel context
Data Mapping tools with JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB
You can also find the source project in my github.
https://github.com/jbossdemocentral/jboss-fuse-homeloan
There is a series of blogs/videos, you can find the previous post here:
- Part one - File connector and simple EIP
- Part two - Persisting Data to Database
- Part three - Integrating with SaaS
First part of demo was to take in and process the information, first we separates the 2 kinds of files, because they are handled differently. And send it to separate messaging broker.
Second demo was about processing the customer data, by reading the xml file and store it into a existing database table.
Third part starts to process housing data by getting number of schools surrounding the house address via SAAS.
Since we have the surrounding schools, we can now start to appraise the value of the house by the information provided, such as number of rooms, number of bathrooms, and even the size of the property. This business rule is built in a Java POJO, by calling the POJO with the data, it then calculate the actual value and store it into Database.
Here is the video,
In this demo, you will learn
SQL Endpoint
The sql component allows you to work with databases using JDBC queries. Also setting datasource for the sql component
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="org.h2.Driver"/>
<property name="url" value="jdbc:h2:file:~/h2/homeloan;AUTO_SERVER=TRUE"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
<!-- configure the Camel SQL component to use the JDBC data source -->
<bean id="sql" class="org.apache.camel.component.sql.SqlComponent">
<property name="dataSource" ref="dataSource"/>
</bean>
Properties Place holder
Placing data into properties, to set base on different configurations.
<propertyPlaceholder location="classpath:sql.properties,googleapp.properties" id="properties"/>
Reference Java POJO bean in camel context
<bean id="Appraiser" class="org.blogdemo.homeloan.processor.AppraisalProcessor" />
Data Mapping tools with JAXB transformation
Translate one data format(XML) into another(Pojo) using JAXB
You can also find the source project in my github.
https://github.com/jbossdemocentral/jboss-fuse-homeloan
Comments
Part three of the home demo is also included in this part?
Thanks,
Samuel Lima
The Data Transformation component automaticaly created a package named "homeloanhouse" under the src/main/java folder where the JAXB classes where generated.
Is it possible to specify another name for the package? Can I previouly define any specific namespace in the XSD file so it's used for the jaxb classpackage or do I have to do it manually editing the blueprint file and changing the name of the package?
Thanks,
Samuel Lima