Matteo Redaelli

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

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

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

See newer post at redaelli.org

<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframework.org/schema/beans&#8221;
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
xmlns:camel-osgi=”http://activemq.apache.org/camel/schema/osgi&#8221;
xmlns:osgi=”http://www.springframework.org/schema/osgi&#8221;
xsi:schemaLocation=”
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://activemq.apache.org/camel/schema/osgi
http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd”&gt;

<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=”” />
</bean>

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

</beans>

See my Google Document for details!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s