L.S.,
In order to resolve the isdms bean, Camel looks in the Blueprint file where the Camel route is defined. You could use a Blueprint <reference id="isdms" .... /> to grab the DataSource from the OSGi Service and give it the id you're using to reference it from the Camel route. Regards, Gert Vanthienen On Fri, Oct 18, 2013 at 11:11 PM, scottdawson <[email protected]> wrote: > Hello, > I'm trying to use a Postgres datasource in ServiceMix 5 (build from very > recent source). I've installed the Postgres driver: > osgi:install -s wrap:mvn:org.postgresql/postgresql/9.2-1003-jdbc4 > > Then I deployed the following datasource blueprint which seems to deploy > without error: > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> > <bean class="org.postgresql.ds.PGPoolingDataSource" id="datasourceBean"> > <property name="serverName" value="theserver"></property> > <property name="databaseName" value="mydb"></property> > <property name="portNumber" value="5432"></property> > <property name="user" value="usr"></property> > <property name="password" value="pw"></property> > </bean> > <service id="datasourceService" interface="javax.sql.DataSource" > ref="datasourceBean"> > <service-properties> > <entry key="osgi.jndi.service.name" value="isdms"></entry> > </service-properties> > </service> > </blueprint> > > Then I've tried to use the datasource in a JDBC component defined within a > blueprint / camelContext / route: > <to uri="jdbc:isdms"/> > > or, similarly, a SQL component defined in a blueprint XML: > <to uri="sql:select * from sometable?dataSource=isdms"/> > > I get the following error when I deploy the JDBC or SQL component: > Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in > the registry for: isdms of type: javax.sql.DataSource > > How should I specify the datasource in the SQL/JDBC blueprint configuration? > > Thank you, > Scott > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/Using-a-datasource-within-a-blueprint-XML-tp5718094.html > Sent from the ServiceMix - User mailing list archive at Nabble.com.
