Hi list,
does anyone have an example how to use JNDI with Geoserver, e.g. with an
Oracle NG datastore?
TIA.
Best regards,
Bart
Hi list,
does anyone have an example how to use JNDI with Geoserver, e.g. with an
Oracle NG datastore?
TIA.
Best regards,
Bart
bartvde@anonymised.com ha scritto:
Hi list,
does anyone have an example how to use JNDI with Geoserver, e.g. with an
Oracle NG datastore?
We don't have support for JNDI data sources at the moment. It would not
be very difficult to add thought, it's a matter of writing a factory
that takes the DataSource out of JNDI and feeds it to the datastore.
The current one builds a DBCP based datastores instead.
If you're interested I can point you to the relevant code in GeoTools
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Andrea, this one is of great interest for me too.
I think the method JDBCDataStoreFactory>>createDataSource would be the right place.
We need an additional parameter "JNDI". Creating a Datastore with jndi has two possibilities (with and wihtout user/password) The algorithm could be the following
1) Check if JNDI param is set, otherwise do business as usual
2) user and password is not given, try getConnection() without params relying on the j2ee container to provide the credentials.
3) if user and password is given, use getConnection(user,password)
Should work for any J2EE compliant jdbc-ng datastore.
Andrea Aime writes:
bartvde@anonymised.com ha scritto:
Hi list,
does anyone have an example how to use JNDI with Geoserver, e.g. with an
Oracle NG datastore?We don't have support for JNDI data sources at the moment. It would not
be very difficult to add thought, it's a matter of writing a factory
that takes the DataSource out of JNDI and feeds it to the datastore.
The current one builds a DBCP based datastores instead.
If you're interested I can point you to the relevant code in GeoToolsCheers
Andrea--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Christian Müller ha scritto:
Andrea, this one is of great interest for me too.
I think the method JDBCDataStoreFactory>>createDataSource would be the right place.
We need an additional parameter "JNDI". Creating a Datastore with jndi has two possibilities (with and wihtout user/password) The algorithm could be the following
1) Check if JNDI param is set, otherwise do business as usual
2) user and password is not given, try getConnection() without params relying on the j2ee container to provide the credentials.
3) if user and password is given, use getConnection(user,password)
Should work for any J2EE compliant jdbc-ng datastore.
Indeed that is one of the options I was considering, and the
easiest to implement among them. There is the usual issue of
finding someone that will do it, integrate the changes
in GeoTools, test the changes in GeoServer + some container.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.