From: Jody G. <jod...@gm...> - 2009-02-27 05:07:00
|
Let me hunt down the global time out handling from the WFS Datastore...- looking in WFS_1_0_0_DataStore ... which calls WFSFeatureReader - WFSFeatureReader extends FCBuffer - FCBuffer does its own time calculation: Date d = new Date(Calendar.getInstance().getTimeInMillis() + timeout); ... if (d.before(Calendar.getInstance().getTime())) { exception = new SAXException("Timeout"); state = STOP; } So this means I am wrong - no use of a global time out here! Sorry about that. Let me look in the java documentation for you :-( As for your idea of URLConnection - the AbstractOpenWebService class uses HTTPURLCOnnection - is that sufficient? InputStream inputStream = connection.getInputStream(); I think we could call connection.setConnectTimeout( int ) or setReadTimeout( int ) and get you the functionality you need? Finally the global timeout can be set with a system property ( http.defaultSocketTimeout if I rememeber correctly). Jody On Fri, Feb 27, 2009 at 4:47 AM, Rafael Soto <raf...@gm...> wrote: > Hey Jody, > > Well researched on the Internet as set a WebMapServer request timeout and > not found anything to help me.. > Because WebMapServer class use a URL instance i can't set a timeout... if > class uses another class, for example, URLConnector i cold that... > > You spoke about i set a global java variable to set a timeout... I not > found anything about it..... > > we can still try?? > > > On Tue, Feb 24, 2009 at 11:22 AM, Rafael Soto <raf...@gm...>wrote: > >> OK Jody, >> >> I will give it to you soon OK? >> >> >> On Mon, Feb 23, 2009 at 6:20 PM, Jody Garnett <jod...@gm...>wrote: >> >>> Woot; glad it helped. Do you have a code example you can share with the >>> list here? (So I can put it in the wiki for others?) >>> Jody >>> >>> >>> On Tue, Feb 24, 2009 at 4:11 AM, Rafael Soto <raf...@gm...>wrote: >>> >>>> OK Jody, i do solve this job change the global timeout settings.. >>>> >>>> Thanks, >>>> >>>> Rafael Soto >>>> >>>> On Sun, Feb 22, 2009 at 10:19 PM, Jody Garnett <jod...@gm...>wrote: >>>> >>>>> I think it just uses the java timeout settings; the WFS code changes >>>>> these global settings (and then changes them back quickly). Perhaps a >>>>> similar trick can be played? I am not sure if any of the other libraries >>>>> like HTTPClient do things better than Java? >>>>> >>>>> Jody >>>>> >>>>> On Tue, Feb 17, 2009 at 12:36 PM, Rafael Soto <raf...@gm... >>>>> > wrote: >>>>> >>>>>> Hi Folks, >>>>>> >>>>>> I didn't find any hint on how to use an timeout try connect a remote >>>>>> wms server. >>>>>> When i try to connect a wrong host my code freeze!! >>>>>> >>>>>> Best Regards, >>>>>> -- >>>>>> Rafael Soto >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Open Source Business Conference (OSBC), March 24-25, 2009, San >>>>>> Francisco, CA >>>>>> -OSBC tackles the biggest issue in open source: Open Sourcing the >>>>>> Enterprise >>>>>> -Strategies to boost innovation and cut costs with open source >>>>>> participation >>>>>> -Receive a $600 discount off the registration fee with the source >>>>>> code: SFAD >>>>>> http://p.sf.net/sfu/XcvMzF8H >>>>>> _______________________________________________ >>>>>> Geotools-gt2-users mailing list >>>>>> Geo...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>>>>> >>>>>> >>>>> >>>> >>>> >>>> -- >>>> Rafael Soto >>>> >>> >>> >> >> >> -- >> Rafael Soto >> > > > > -- > Rafael Soto > |