You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Matt Sicker <bo...@gmail.com> on 2016/08/10 18:40:50 UTC

Can't see my DataSource services in Karaf 4 jdbc:ds-list

I'm using dbcp2 manually and export my constructed DataSource objects as
services. In Karaf 3, I could execute "jdbc:datasources" and I'd get the
entire list. That command appears to have been replaced by "jdbc:ds-list"
in Karaf 4, and it does not list my DataSources anymore. I can see the
services when I execute "service:list", but not via the jdbc:* commands.

-- 
Matt Sicker <bo...@gmail.com>

Re: Can't see my DataSource services in Karaf 4 jdbc:ds-list

Posted by jochenw <jo...@googlemail.com>.
Hi,

I don't have a solution but a similar observation:

when creating the DS via blueprint

	<service ref="myXADataSource" interface="javax.sql.DataSource">
		<service-properties>
			<entry key="osgi.jndi.service.name" value="jdbc/myXADataSource" />
		</service-properties>
	</service>

I cannot see it with jdbc:ds-list, when creating the same DS via
pax-jdbc-config, I can see it. In both cases, the DS works correctly.

Regards,
Jochen



--
View this message in context: http://karaf.922171.n3.nabble.com/Can-t-see-my-DataSource-services-in-Karaf-4-jdbc-ds-list-tp4047486p4047508.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Can't see my DataSource services in Karaf 4 jdbc:ds-list

Posted by Christian Schneider <ch...@die-schneider.net>.
I just checked the sources. It seems karaf jdbc uses the property 
dataSourceName to identify the data source.

It searches for all services of type DataSource but then only considers 
those that have the property dataSourceName set.

How do you identify your datasource? Do you set the aries jndi name 
property?

Christian

On 10.08.2016 20:40, Matt Sicker wrote:
> I'm using dbcp2 manually and export my constructed DataSource objects 
> as services. In Karaf 3, I could execute "jdbc:datasources" and I'd 
> get the entire list. That command appears to have been replaced by 
> "jdbc:ds-list" in Karaf 4, and it does not list my DataSources 
> anymore. I can see the services when I execute "service:list", but not 
> via the jdbc:* commands.
>
> -- 
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com