Yes, I know its being deployed twice which is my confusion. We're a mixed shop (windows/linux), when we perform these steps on our windows dev machines there is no issue. When we move it to Linux we see the double creation of the datasource. My understanding is that when you add a datasource via the CLI karaf creates the xml blueprint in the deploy directory (correct?). At first I thought karaf was reading the blueprint again, but when we remove the second datasources by the CLI and refresh or restart karaf they reappear.
Here is the grep output: dart-user@root>ls | grep -i datasource [javax.sql.DataSource] osgi.service.blueprint.compname = dataSource [javax.sql.DataSource] osgi.service.blueprint.compname = dataSource [javax.sql.DataSource] osgi.service.blueprint.compname = dataSource [javax.sql.DataSource] osgi.service.blueprint.compname = dataSource [javax.sql.DataSource] osgi.service.blueprint.compname = dataSource [javax.sql.DataSource] osgi.service.blueprint.compname = dataSource osgi.blueprint.container.symbolicname = datasource-wpmsuiteNonCache.xml osgi.blueprint.container.symbolicname = datasource-wpmsuiteNonCache.xml osgi.blueprint.container.symbolicname = datasource-wpmSuiteCache.xml osgi.blueprint.container.symbolicname = datasource-wpmSuiteCache.xml osgi.blueprint.container.symbolicname = datasource-dart.xml osgi.blueprint.container.symbolicname = datasource-dart.xml service.pid = org.ops4j.datasource [org.osgi.service.jdbc.DataSourceFactory] [org.osgi.service.jdbc.DataSourceFactory] [org.osgi.service.jdbc.DataSourceFactory] [org.osgi.service.jdbc.DataSourceFactory] [org.osgi.service.jdbc.DataSourceFactory] Regards, Jason -----Original Message----- From: Jean-Baptiste Onofré [mailto:[email protected]] Sent: Friday, June 19, 2015 9:24 AM To: [email protected] Subject: Re: jdbc datasource being created twice Hi Jason, it seems that the service are deployed twice. For instance for dart datasource, we have service ID 1161 and 1163. Can you do: ls |grep -i datasource to see the bundles providing the services. Don't you have the blueprint XML twice in your container ? Regards JB On 06/19/2015 06:16 PM, Pratt, Jason wrote: > Hi JB - each datasource has a separate name > > Name | Product | Version | URL > | Status > --------------------------------------------------------------------------------------------------------- > jdbc/wpmsuiteNonCache, 1148 | MySQL | 5.6.21 | > jdbc:mysql://server:3306/wpmsuiteNonCache | OK > jdbc/wpmsuiteNonCache, 1150 | MySQL | 5.6.21 | > jdbc:mysql://server:3306/wpmsuiteNonCache | OK > jdbc/dart, 1161 | MySQL | 5.6.21 | jdbc:mysql://test:3306/dart > | OK > jdbc/dart, 1163 | MySQL | 5.6.21 | jdbc:mysql://test:3306/dart > | OK > > karaf generated blueprints are attached > > Kind regards, > Jason > > -----Original Message----- > From: Jean-Baptiste Onofré [mailto:[email protected]] > Sent: Friday, June 19, 2015 9:07 AM > To: [email protected] > Subject: Re: jdbc datasource being created twice > > Hi Jason, > > the two datasources have the same name ? > > Can you share your blueprint XML ? > > Regards > JB > > On 06/19/2015 06:04 PM, Pratt, Jason wrote: >> Hello - I am running into a situation where I have defined 2 jdbc >> datasource via the CLI and they are created properly along with the >> xml file in the /deploy directory. However, when I run >> jdbc:datasources each connection is listed twice (2x) and it is >> causing problems with jpa and camel. >> >> What have I done wrong and how can I correct this? >> >> Kind regards, >> >> Jason >> > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com > -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
