We have not an etc/org.ops4j.pax.web.cfg file. We will study changing
http-jetty to http-osgi transport. Anyway, are there a way to configure our
"standalone" Jetty instance to change maxIdleTime property using
configuration files? We need to release a patch to avoid this timeout error
first and then we will develop a better way to publish our REST API.

Thank you both for your help!

On 3 April 2013 02:59, Freeman Fang <freeman.f...@gmail.com> wrote:

> Yes, if you have etc/org.ops4j.pax.web.cfg, then ensure you have
> org.ops4j.pax.web.config.file=etc/jetty.xml
> in that file
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://fusesource.com | http://www.redhat.com/
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: @Freeman小屋
>
> On 2013-4-3, at 上午5:43, Christian Müller wrote:
>
> > Did you also provide/configure
> ${SERVICEMIX_HOME}/etc/org.ops4j.pax.web.cfg?
> > Can you share it?
> >
> > Best,
> > Christian
> >
> >
> > On Tue, Apr 2, 2013 at 5:05 PM, Julio Carlos Barrera Juez <
> > juliocarlos.barr...@i2cat.net> wrote:
> >
> >> I have tested your configuration file, only modifying our property and
> it
> >> does not work. The timeout is still at 200 seconds.
> >> How can I know that the file is actually read?
> >> Our new conf file:
> >>
> >> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
> >> DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd";>
> >>
> >> <Configure class="org.eclipse.jetty.server.Server">
> >>
> >>    <!-- =========================================================== -->
> >>    <!-- Set connectors                                              -->
> >>    <!-- =========================================================== -->
> >>    <!-- One of each type!                                           -->
> >>    <!-- =========================================================== -->
> >>
> >>    <!-- Use this connector for many frequently idle connections
> >>         and for threadless continuations.
> >>    -->
> >>    <Call name="addConnector">
> >>      <Arg>
> >>          <New
> class="org.eclipse.jetty.server.nio.SelectChannelConnector">
> >>            <Set name="maxIdleTime">10000</Set>
> >>          </New>
> >>      </Arg>
> >>    </Call>
> >>
> >>
> >> </Configure>
> >>
> >> On 2 April 2013 16:45, Julio Carlos Barrera Juez <
> >> juliocarlos.barr...@i2cat.net> wrote:
> >>
> >>> We publish our REST API using org.apache.cxf.ws.address property and
> the
> >>> absolute URL (like http://localhost:8888/APP_NAME/RESOURCE).
> >>>
> >>>
> >>> On 2 April 2013 16:05, Freeman Fang <freeman.f...@gmail.com> wrote:
> >>>
> >>>> What's your cxf server address looks like in your server
> configuration?
> >>>> -------------
> >>>> Freeman(Yue) Fang
> >>>>
> >>>> Red Hat, Inc.
> >>>> FuseSource is now part of Red Hat
> >>>> Web: http://fusesource.com | http://www.redhat.com/
> >>>> Twitter: freemanfang
> >>>> Blog: http://freemanfang.blogspot.com
> >>>> http://blog.sina.com.cn/u/1473905042
> >>>> weibo: @Freeman小屋
> >>>>
> >>>> On 2013-4-2, at 下午10:03, Julio Carlos Barrera Juez wrote:
> >>>>
> >>>>> But we are not using standalone Jetty. We are using Apache ServiceMix
> >>>> with
> >>>>> CXF, and inside of it there is a Jetty instance. Should we use your
> >>>>> configuration in this case?
> >>>>>
> >>>>> On 2 April 2013 15:44, Freeman Fang <freeman.f...@gmail.com> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> The configuration you used is for CXF http-jetty, but not for
> >>>> standalone
> >>>>>> jetty.
> >>>>>>
> >>>>>> The jetty configuration should be like
> >>>>>>
> >>>>>> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//
> >>>>>> DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd";>
> >>>>>>
> >>>>>> <Configure class="org.eclipse.jetty.server.Server">
> >>>>>>
> >>>>>>   <!-- ===========================================================
> >> -->
> >>>>>>   <!-- Set connectors
> >> -->
> >>>>>>   <!-- ===========================================================
> >> -->
> >>>>>>   <!-- One of each type!
> >> -->
> >>>>>>   <!-- ===========================================================
> >> -->
> >>>>>>
> >>>>>>   <!-- Use this connector for many frequently idle connections
> >>>>>>        and for threadless continuations.
> >>>>>>   -->
> >>>>>>   <Call name="addConnector">
> >>>>>>     <Arg>
> >>>>>>         <New
> >>>> class="org.eclipse.jetty.server.nio.SelectChannelConnector">
> >>>>>>           <Set name="host"><Property name="jetty.host" /></Set>
> >>>>>>           <Set name="port"><Property name="jetty.port"
> >>>>>> default="8181"/></Set>
> >>>>>>           <Set name="maxIdleTime">300000</Set>
> >>>>>>           <Set name="Acceptors">2</Set>
> >>>>>>           <Set name="statsOn">false</Set>
> >>>>>>           <Set name="confidentialPort">8443</Set>
> >>>>>>           <Set name="lowResourcesConnections">20000</Set>
> >>>>>>           <Set name="lowResourcesMaxIdleTime">5000</Set>
> >>>>>>         </New>
> >>>>>>     </Arg>
> >>>>>>   </Call>
> >>>>>>
> >>>>>>
> >>>>>> </Configure>
> >>>>>>
> >>>>>> -------------
> >>>>>> Freeman(Yue) Fang
> >>>>>>
> >>>>>> Red Hat, Inc.
> >>>>>> FuseSource is now part of Red Hat
> >>>>>> Web: http://fusesource.com | http://www.redhat.com/
> >>>>>> Twitter: freemanfang
> >>>>>> Blog: http://freemanfang.blogspot.com
> >>>>>> http://blog.sina.com.cn/u/1473905042
> >>>>>> weibo: @Freeman小屋
> >>>>>>
> >>>>>> On 2013-4-2, at 下午9:08, Julio Carlos Barrera Juez wrote:
> >>>>>>
> >>>>>>> Hi!
> >>>>>>>
> >>>>>>> We have an application developed on top of ServiceMix 4.4.1. We are
> >>>>>>> experiencing a kind of timeout in my CXF REST Web Services. After
> >>>> exactly
> >>>>>>> 200 seconds, in a long processing task, WS server closes the
> >>>> connection
> >>>>>>> opened by a REST client with a FIN TCP packet adn the client resend
> >>>> the
> >>>>>>> message. It produces bad behaviours in the server, because both
> >>>> messages
> >>>>>>> are processed. We are thinking on developing asynchronous WS, but
> >>>> during
> >>>>>>> this process we need to develop a patch to this issue to avoid
> >> double
> >>>>>> calls.
> >>>>>>>
> >>>>>>> We use CXF and dOSGI to develop our REST API using javax.ws.*
> >>>>>> annotations.
> >>>>>>> We have tried to configure 'maxIdleTime' property of Jetty
> connector
> >>>>>>> creating a Jetty configuration file in
> >> $SERVICEMIX_HOME/etc/jetty.xml
> >>>>>> with
> >>>>>>> this contents:
> >>>>>>>
> >>>>>>> <beans xmlns="http://www.springframework.org/schema/beans";
> >>>> xmlns:beans="
> >>>>>>> http://www.springframework.org/schema/beans"; xmlns:xsi="
> >>>>>>> http://www.w3.org/2001/XMLSchema-instance"; xmlns:sec="
> >>>>>>> http://cxf.apache.org/configuration/security"; xmlns:http="
> >>>>>>> http://cxf.apache.org/transports/http/configuration"; xmlns:httpj="
> >>>>>>> http://cxf.apache.org/transports/http-jetty/configuration";
> >>>> xmlns:jaxws="
> >>>>>>> http://java.sun.com/xml/ns/jaxws"; xsi:schemaLocation="
> >>>>>>> http://cxf.apache.org/configuration/security
> >>>>>>> http://cxf.apache.org/schemas/configuration/security.xsd
> >>>>>>> http://cxf.apache.org/transports/http/configuration
> >>>>>>> http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >>>>>>> http://cxf.apache.org/transports/http-jetty/configuration
> >>>>>>> http://cxf.apache.org/schemas/configuration/http-jetty.xsd
> >>>>>>> http://www.springframework.org/schema/beans
> >>>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
> >>>>>>>
> >>>>>>> <httpj:engine-factory bus="cxf">
> >>>>>>>      <httpj:engine port="9001">
> >>>>>>>              <httpj:connector>
> >>>>>>>                      <beans:bean
> >>>>>>> class="org.eclipse.jetty.server.nio.SelectChannelConnector">
> >>>>>>>                              <beans:property name="maxIdleTime"
> >>>>>>> value="10000" />
> >>>>>>>                      </beans:bean>
> >>>>>>>              </httpj:connector>
> >>>>>>>      </httpj:engine>
> >>>>>>> </httpj:engine-factory>
> >>>>>>> </beans>
> >>>>>>>
> >>>>>>> We expect that the timeout was set to 10 seconds (instead of 200,
> >> only
> >>>>>> for
> >>>>>>> testing purposes), but it still was 200 seconds.
> >>>>>>>
> >>>>>>> How can we configure this property?
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>
> >>
>
>

Reply via email to