Hi,

You might do a job that is already done.

Look for "postgresql" on maven central. I think you will find adapter for
the postgresql jdbc driver.

E.g.:

   - PostgreSQL JDBC JAR:
   
http://search.maven.org/#artifactdetails%7Corg.apache.servicemix.bundles%7Corg.apache.servicemix.bundles.postgresql%7C9.3-1100-jdbc41_1%7Cbundle
   - Adapter that registers the DataSourceFactory service:
   
http://search.maven.org/#artifactdetails%7Corg.ops4j.pax.jdbc%7Cpax-jdbc-postgresql%7C0.3.0%7Cbundle

I tried it before and the two bundles worked well together.

Regards,
*Zsoldos Balázs*


On Sat, Apr 12, 2014 at 12:20 AM, Jürgen Rose <[email protected]>wrote:

> Hi,
>
> I'm Jürgen, new on this list and I'm currently osgifying the postgresql
> jdbc driver (https://github.com/pgjdbc/pgjdbc/issues/71).
>
> I have some questions regarding the DataSourceFactory. There are a bunch
> of predefined property names defined like JDBC_DATABASE_NAME which is
> databaseName, JDBC_PORT_NUMBER is portNumber, and so on.
>
> As far as I understand these are basically the Properties which are
> defined as required/optional properties in the JDBC spec.
>
> What is the policy regarding additional properties, should they just be
> passed on as well? What about unsupported properties, should they just
> be ignored, or lead to an exception?
>
> Whan I look at the h2 code it is a bit of a mix:
>
> http://grepcode.com/file_/repo1.maven.org/maven2/com.h2database/h2/1.3.174/org/h2/util/OsgiDataSourceFactory.java/?v=source
>
> The implementation of eclipselabs for postgres uses introspection to set
> the properties:
>
> https://github.com/BryanHunt/dbaccess/blob/master/bundles/org.eclipselabs.dbaccess.postgresql/src/org/eclipselabs/dbaccess/postgresql/AbstractDataSourceFactory.java
> and also throws an error if a property doesn't exist.
>
> What is the canonical approach here?
>
> best regards
> Jürgen
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to