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 redaelli.org

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 test-wsdl-first-osgi.zip

 

4 Responses to “Connecting to a database with a webService (cxf) deployed (osgi) in Servicemix”

  1. Thomas Gill Says:

    Matteo – How do you install an Oracle driver in Servicemix. I have the oracle6.jar. Tried putting in lib dir and also

    install file:///tmp/ojdbc6.jar

    Trying to setup Master -Slave using JDBC for ActiveMQ

  2. Matteo Says:

    In smx4 try installing bundle from springsource

    http://www.springsource.com/repository/app/bundle/version/detail?name=com.springsource.oracle.jdbc&version=10.2.0.2

    if you cannot, please ask in servicemix forum, I’m not an expert in java/osgi..

    Regards

  3. Thomas Gill Says:

    Thanks Matteo – The Spring version is a little old but works. I have the ActiveMQ tables created in DB and everything works. I tried with one Master alone and when running it is all good. But when the Master goes down the DB lock is not removed. Planning to start 2 Brokers and see how it behaves.

  4. Rodrigo Says:

    Hi Mateo, i’m new in the world of Soa, i tried to follow your example in servicemix 4, and it’s easy do it, I compile my project whit mvn and i have no problems, wehen i copy the jar into deploy folder, and make a list of installed components, this componnent appeas, but i can’t acces to route of wsdl …

    http://localhost:8080/cxf/PersonService?wsdl

    in any case i use your example, (download the zip and compile and paste the jar in my deploy folder) and occurs the same, the route for the wsdl isn’t exist and i don’t know why.. Have you ever had this problem? you know how could fix it ?

    Thanks a lot !!

    Rodrigo


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