This content has been marked as final.
Show 1 reply
-
1. Re: Reuse the beans configuration in camel blueprint
grgrzybek Jun 8, 2017 2:11 AM (in response to sarada.ch)Hello
In the blueprint where you define datasource and session factory you just add (for data source):
<service interface="javax.sql.DataSource" ref="dataSource">
<service-properties>
<entry key="osgi.jndi.service.name" value="jdbc/mydatasource"/>
<entry key="datasource.name" value="mydatasource"/>
<entry key="name" value="mydatasource"/>
<entry key="aries.xa.aware" value="false" />
<entry key="aries.xa.name" value="mydatasource" />
</service-properties>
</service>
And in other blueprints (in other bundles) you just add:
<reference id="dataSource"
interface="javax.sql.DataSource"
filter="(datasource.name=mydatasource)" availability="mandatory" />
regards
Grzegorz Grzybek