John,
I wrote that section of the guide. It needs to be updated for Jetty 9 as some of the Jetty class names have changed (on my to-do list). I have attached an updated jetty.xml for Jetty 9 and postgres. The Oracle content should still work once the Jetty classes are changed.
I have not tried using JNDI from standalone Jetty, only from Eclipse. I think you should be able to insert the New element from the attached jetty.xml inside the Configure element of your existing etc/jetty.xml (for example from your geoserver-*-bin.zip).
In Eclipse I also set some Java properties. If you need these, add them to your bin/startup.sh or similar. But standalone Jetty might set these itself? Try without them first.
-Djava.naming.factory.url.pkgs=org.eclipse.jetty.jndi
-Djava.naming.factory.initial=org.eclipse.jetty.jndi.InitialContextFactory
You will likely also need to copy/move (not sure) the postgresql jar from webapps/geoserver/WEB-INF/lib to the top-level lib so Jetty can find the driver at startup time. You may also need the commons dbcp jar for the configured connection pool; I do not know for standalone Jetty.
If I recall correctly, Jetty is more permissive than Tomcat and does not require you to declare your JNDI resource in the GeoServer web.xml. It just works.
If you get it working, please report back so we can add JNDI for standalone Jetty to the manual.
Kind regards,
Ben.
On 13/05/16 07:51, Stefano Costa wrote:
Hi John,
have you already checked out this page in the GeoServer manual?
http://docs.geoserver.org/latest/en/developer/eclipse-guide/#configuring-jndi-resources-in-jetty
It's about running Jetty under Eclipse, but probably similar steps apply to
standalone Jetty (I have not tried though).
Hope this helps.
On Thu, May 12, 2016 at 8:08 PM, John McCarty <johmcc1138@anonymised.com> wrote:
Hello All,
Can anyone point me to an example of how to setup a JNDI DB resource in
Jetty, so that it is available from within GeoServer?
Which jetty config xml file (or the geoserver web.xml?) should the JNDI
resource be added to?
Are there any examples for PostGIS, Oracle and/or SQL Server JNDI
connections that you could also point me to?
I’ve scanned the docs and looked online for examples… and most are either
not Jetty specific, or don’t really explain where (which file) the content
should be put into…
thanks in advance,
John
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data
untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
jetty.xml (1.29 KB)