John, please keep discussions on list.

Yes, you are correct: 2.8.x is bundled with Jetty 6. 2.9.x and master 
use Jetty 9. To use Jetty 6, the same instructions apply, just use the 
old names from the guide. The Jetty renaming occurred in Jetty 7:
https://wiki.eclipse.org/Jetty/Starting/Porting_to_Jetty_7#Renaming_of_Packages_and_Classes

Jetty 9:

<Configure class="org.eclipse.jetty.server.Server">
     <New class="org.eclipse.jetty.plus.jndi.Resource">

Jetty 6:

<Configure class="org.mortbay.jetty.Server">
     <New class="org.mortbay.jetty.plus.naming.Resource">

Tomcat is widely used. Jetty is lightweight and has quick startup. 
Whichever you prefer.

I do not know about SQL server. Perhaps a new thread to draw attention?

Kind regards,
Ben.


On 13/05/16 10:05, John McCarty wrote:
> Thanks Ben!
>
> It looks like this is using Jetty6 tho…   I’m using Geoserver 2.8.2, from the 
> Windows installer.
> Can you confirm if that is Jetty6 or 9?  Or how would/could I swap out v6 for 
> v9?
>
> Maybe I should just install Tomcat7 and run it all thru that?   Maybe it 
> would be easier to setup the JNDI there too?
>
> Also, the main thing I’m trying for here is to see if I can get a connection 
> to a SQL Server 2012 DB…. which I’m not sure is possible yet anyway… the 
> Goeserver extension for SQL Server says it only supports up to 2008.
>
> thanks,
> John
>
>
>> On May 12, 2016, at 3:38 PM, Ben Caradoc-Davies <b...@transient.nz> wrote:
>>
>> 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 <johmcc1...@gmail.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 
>>> <https://ad.doubleclick.net/ddm/clk/304595813;131938128;j>
>>>
>>>
>>>
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net 
>>> <mailto:Geoserver-users@lists.sourceforge.net>
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users 
>>> <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>>>
>>
>> --
>> Ben Caradoc-Davies <b...@transient.nz <mailto:b...@transient.nz>>
>> Director
>> Transient Software Limited <http://transient.nz/ <http://transient.nz/>>
>> New Zealand
>> <jetty.xml>
>
>

-- 
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
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

Reply via email to