Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
karaf@root()> feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.7.0/xml/features
karaf@root()>feature:install pax-jdbc-spec
karaf@root()>feature:install transaction
karaf@root()>bundle:install -s mvn:org.postgresql/postgresql/9.4-1200-jdbc41
karaf@root()> service:list org.osgi.service.jdbc.DataSourceFactory
karaf@root()>feature:install pax-jdbc-config
karaf@root()>feature:install pax-jdbc-pool-dbcp2
Then create a cfg file to give all database setup under KARAF_HOME/etc/org.ops4j.datasource-companymanager.cfg
karaf@trun()> service:list javax.sql.DataSource
----------------------
databaseName = MobileCRM
dataSourceName = MobileCRMDS
felix.fileinstall.filename = file:/var/ESBSE/container/etc/org.ops4j.datasource-MobileCRMDS.cfg
osgi.jdbc.driver.name = PostgreSQL JDBC Driver-pool-xa
osgi.jndi.service.name = MobileCRMDS
password = mobilecrmuser
portNumber = 5432
serverName = 192.168.100.121
service.factoryPid = org.ops4j.datasource
service.pid = org.ops4j.datasource.1bfab764-f3e3-4a3d-a1f8-fcc56774aa6a
user = mobilecrmuser
service.id = 605
service.bundleid = 306
service.scope = singleton
Provided by :
OPS4J Pax JDBC Config (306)
----------------------
databaseName = WeChat
dataSourceName = WeChatDS
felix.fileinstall.filename = file:/var/ESBSE/container/etc/org.ops4j.datasource-WeChatDS.cfg
osgi.jdbc.driver.name = PostgreSQL JDBC Driver-pool-xa
osgi.jndi.service.name = WeChatDS
password = postgres
portNumber = 5432
serverName = 192.168.100.121
service.factoryPid = org.ops4j.datasource
service.pid = org.ops4j.datasource.a34df05b-a4d3-452a-8a54-6bd964669a25
user = postgres
service.id = 606
service.bundleid = 306
service.scope = singleton
Provided by :
OPS4J Pax JDBC Config (306)