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.

Reply via email to