Matteo Redaelli

Computer Science OpenSource Linux Africa Volontariato Ambiente Energia solare Mezzi Pubblici Piste ciclabili

Connecting to a database with a webService (cxf) deployed (osgi) in Servicemix 7 Jun 2009

Filed under: Me — Matteo @ 18:37
Tags: , , ,

See newer post at

1) Install and start ServiceMix 4.0

2) Add necessary bundles

features/install cxf-osgi

osgi/install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.2.2_3/

osgi/install -s wrap:mvn:org.springframework/spring-jdbc/2.5.6/

osgi/install -s wrap:mvn:mysql/mysql-connector-java/5.1.6

See details in this gooole document or download


Howto sharing (osgi style) a database connection in Servicemix4 / FuseEsb4

Filed under: Me — Matteo @ 13:58
Tags: ,

See newer post at

<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”;

<bean id=”moodleDS”>
<property name=”driverClassName” value=”com.mysql.jdbc.Driver” />
<property name=”url”
value=”jdbc:mysql://localhost:3306/moodle” />
<property name=”username” value=”root” />
<property name=”password” value=”” />

<osgi:service id=”moodleDSOsgiService” ref=”moodleDS” interface=”javax.sql.DataSource” />


See my Google Document for details!


Connecting to a database with a webService (cxf) deployed (jbi) in Servicemix 30 May 2009

Filed under: Me — Matteo @ 11:53
Tags: , , , ,

See the newer post at


Apache ServiceMix at the moment doesn’t have a JBI component for connecting to a database (servicemiix-jdbc is in the roadmap): in the meanwhile you have to use servicemix-cxf or servicemix-bean.

This example (, cxf-wsdl-first.pdf)  is built on top of the example cxf-wsdl-first and can be deployed in apache servicemix 4.0 as JBI sa package.