You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Sergey (JIRA)" <ji...@apache.org> on 2015/10/12 09:52:05 UTC
[jira] [Comment Edited] (KARAF-3976) Broken compatibility with 3.x
jdbc DataSources
[ https://issues.apache.org/jira/browse/KARAF-3976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952720#comment-14952720 ]
Sergey edited comment on KARAF-3976 at 10/12/15 7:51 AM:
----------------------------------------------------------
I'm not sure I understand you. Here is part of JdbcServiceImpl from 4.x branch:
{code:java}
for (ServiceReference reference : references) {
String dsName = (String)reference.getProperty(DataSourceFactory.JDBC_DATASOURCE_NAME);
if (dsName != null) {
datasources.add(dsName);
}
}
{code}
We *can* list datasources using jdbc:ds-list command, if deployed as spring or blueprint xml, as far as we have JDBC_DATASOURCE_NAME property set. If we have no this property - karaf can just provide some reasonable default, why not?
I'm almost sure that all other issues could be fixed also. We *can* execute queries - but with some annoying restrictions.
I hope I can try to provide a patch.
was (Author: cp123):
I'm not sure I understand you. Here is part of JdbcServiceImpl from 4.x branch:
{code:java}
for (ServiceReference reference : references) {
String dsName = (String)reference.getProperty(DataSourceFactory.JDBC_DATASOURCE_NAME);
if (dsName != null) {
datasources.add(dsName);
}
}
{code}
We can list datasources using jdbc:ds-list command, if deployed as spring or blueprint xml, as far as we have JDBC_DATASOURCE_NAME property set. If we have no this property - karaf can just provide some reasonable default, why not?
I'm almost sure that all other issues could be fixed also.
I hope I can try to provide a patch.
> Broken compatibility with 3.x jdbc DataSources
> ----------------------------------------------
>
> Key: KARAF-3976
> URL: https://issues.apache.org/jira/browse/KARAF-3976
> Project: Karaf
> Issue Type: Bug
> Components: karaf-jdbc
> Affects Versions: 4.0.1
> Reporter: Sergey
> Assignee: Jean-Baptiste Onofré
>
> 1st of all, current documentaion is wrong, because command names was changed to jdbc:ds-info, for example, but http://karaf.apache.org/manual/latest/users-guide/jdbc.html still contains jdbc:info command names.
> Most important compatibility breaking change was another one: in karaf 3.x I was able to deploy DataSource using spring-dm xml or blueprint, and it was registered as a service and in jndi, and was listed using jdbc:datasources command. Right now no datasources are listed.
> {code}
> karaf@root()> jndi:names
> JNDI Name | Class Name
> ------------------------------------------------------------------------------------------
> osgi:service/jdbc/zeusDataSource | net.sourceforge.jtds.jdbcx.JtdsDataSource
> osgi:service/jdbc/arenaDS | net.sourceforge.jtds.jdbcx.JtdsDataSource
> osgi:service/jdbc/tomsDS | net.sourceforge.jtds.jdbcx.JtdsDataSource
> osgi:service/jdbc/cofDS | com.sybase.jdbc3.jdbc.SybDataSource
> osgi:service/jdbc/fidbDataSource | net.sourceforge.jtds.jdbcx.JtdsDataSource
> osgi:service/jdbc/murexDS | com.sybase.jdbc3.jdbc.SybDataSource
> osgi:service/jdbc/gpDataSource | org.postgresql.ds.PGPoolingDataSource
> karaf@root()> jdbc:ds-info jdbc/fidbDataSource
> Property | Value
> ---------------------------------------------------------------------
> driver.version | 1.2.2
> db.version | 10.50.4000
> db.product | Microsoft SQL Server
> url | jdbc:jtds:sqlserver:
> driver.name | jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
> username | ...
> karaf@root()> jdbc:ds-list
> Name | Product | Version | URL | Status
> ---------------------------------------
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)