[Seasar-user:10490] Re: s2Axis2でtimeoutの設定が有効になっていないように思われます。

Takanori Suzuki [E-MAIL ADDRESS DELETED]
2007年 9月 13日 (木) 00:22:39 JST


たかのりです。

Axis1.1から、仕様が変わり、

 ・HTTPConstants.SO_TIMEOUT
 ・HTTPConstants.CONNECTION_TIMEOUT

の指定だけでは、タイムアウトが設定できなくなってしまっていたようです。
対応しておらず、申し訳ありませんでした。


> isUseSeparateListenerが良く分からないので、
> 正しいかは分かりませんが、
> この分岐でtrueのルートを通ればよさげですね。

少し変則的ですが、diconで以下のように指定してみてください。

    <component name="ioConnector"
               class="org.seasar.remoting.axis2.connector.AxisInOutConnector">
        <property name="baseURL">baseURL</property>
        <property name="timeout">10000</property>
        <property name="options">
        	<component class="org.apache.axis2.client.Options">
        		<property name="timeOutInMilliSeconds">10000</property>
        	</component>
        </property>
    </component>


07/09/11 に 鈴木 順<[E-MAIL ADDRESS DELETED]> さんは書きました:
>
> 杉本さん
>
> お世話になっております。鈴木です。
>
> なるほど。setTimeOutInMilliSecondsが必要なのですね。
> s2axis2のソースをちら見したのですが、
> org.seasar.remoting.axis2.connector.AbstractRPCConnector
> のinitにて、
>            if (super.options.isUseSeparateListener()) {
>                super.options.setTimeOutInMilliSeconds(timeout);
>            } else {
>                super.options.setProperty(HTTPConstants.SO_TIMEOUT,
>                        new Integer(timeout));
>                super.options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,
>                        new Integer(timeout));
>            }
> となっております。
> isUseSeparateListenerが良く分からないので、
> 正しいかは分かりませんが、
> この分岐でtrueのルートを通ればよさげですね。
>
> ちょっとまた色々調べてみます。
>
> ※この辺に詳しい方いらっしゃいましたら、ご教授ください。
>
>
>
> On Tue, 11 Sep 2007 23:33:53 +0900
> "Kazuya Sugimoto" <[E-MAIL ADDRESS DELETED]> wrote:
>
> > 杉本です。
> >
> > 私も Axis2 ではまりました。S2Axis2 は使ってないですが・・
> >
> > Axis2 のOptions に設定するのですが、こっちだと駄目で
> > options.setProperty(HTTPConstants.SO_TIMEOUT, 5000);
> >
> > こっちで設定するとOKでした
> > options.setTimeOutInMilliSeconds(5000);
> >
> > 参考までに
> > http://d.hatena.ne.jp/sugimotokazuya/20070807#1186481415
> >
> > なので、S2Axis2 で setTimeOutInMilliSeconds をどこで設定すれば良いかが
> > 分かれば解決すると思います。
> >
> >
> > 07/09/11 に 鈴木 順<[E-MAIL ADDRESS DELETED]> さんは書きました:
> > >
> > > お世話になっております。鈴木と申します。
> > >
> > > s2Axisを利用しバッチ処理の開発を行っております。
> > > Timeoutをなしに設定したいのですが、方法等が分かりませんので、
> > > とりあえず大きな値にして実行してみたところ、
> > > 従来の通り30秒でTimeoutしてしまいます。
> > >
> > > 回避策もしくは、そもそもTimeoutを無効にする方法等を教えていただけたら幸
> > > いです。(Timeout=0、Timeout=-1等は試しました)
> > >
> > > 一応Timeoutしましてもサーバ側の処理は続いており数分後に終了しますが、
> > > 複数のバッチ処理を様々な組み合わせで起動する必要がります。
> > > クライアント側で組み合わせごとに.shを作る関係上、
> > > サーバ側の処理が終わり次第、クライアント側に制御が戻る必要がありますので、
> > > 片方向の非同期通信(AxisOnewayConnector)では要件が満たせない状況です。
> > >
> > > ちょっと調べましたところ、
> > > 実行時に出るログが下記のようになっておりますので、
> > > 結局はtimeoutが30秒となっているように感じます。
> > >
> > > 2007-09-11 22:02:09,703 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.socket.timeout = 14400000
> > > 2007-09-11 22:02:11,140 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.connection.timeout = 14400000
> > > 2007-09-11 22:02:11,703 [main] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.socket.timeout = 30000
> > >
> > > dicon的には以下のようになっております。
> > >
> > >    <component class="org.apache.axis2.description.AxisService" autoBinding="none"/>
> > >
> > >    <component name="ioRemoting"
> > >               class="org.seasar.remoting.common.interceptor.RemotingInterceptor">
> > >        <property name="connector">ioConnector</property>
> > >    </component>
> > >
> > >    <component name="ioConnector"
> > > class="org.seasar.remoting.axis2.connector.AxisInOutConnector">
> > >                <property name="timeout">14400000</property>
> > >    </component>
> > >
> > > 環境は以下の通りです。
> > > s2axis2-0.3.0
> > > s2-2.4.16
> > > axis2-1.2
> > > java5
> > > tomcat-5.5.23
> > >
> > > maven2を利用し構築しております。
> > > pomの抜粋は以下の通りです。
> > >
> > >        <dependency>
> > >          <groupId>org.seasar.axis</groupId>
> > >          <artifactId>s2axis2</artifactId>
> > >          <version>0.3.0</version>
> > >        </dependency>
> > >        <dependency>
> > >          <groupId>org.apache.axis2</groupId>
> > >          <artifactId>axis2</artifactId>
> > >          <version>1.2</version>
> > >      <scope>provided</scope>
> > >        </dependency>
> > >        <dependency>
> > >          <groupId>org.apache.axis2</groupId>
> > >          <artifactId>axis2-kernel</artifactId>
> > >          <version>1.2</version>
> > >      <scope>provided</scope>
> > >        </dependency>
> > >    <dependency>
> > >      <groupId>org.seasar.container</groupId>
> > >      <artifactId>s2-extension</artifactId>
> > >      <version>2.4.16</version>
> > >      <scope>provided</scope>
> > >    </dependency>
> > >
> > > 以上 大変申し訳ございませんが宜しくお願いいたします。
> > >
> > >
> > > _______________________________________________
> > > Seasar-user mailing list
> > > [E-MAIL ADDRESS DELETED]
> > > https://ml.seasar.org/mailman/listinfo/seasar-user
> > >
> >
> >
> > --
> > Kazuya Sugimoto
> > Microsoft MVP Visual Developer - Solutions Architect
> > http://d.hatena.ne.jp/sugimotokazuya/
> > _______________________________________________
> > Seasar-user mailing list
> > [E-MAIL ADDRESS DELETED]
> > https://ml.seasar.org/mailman/listinfo/seasar-user
>
>
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>



Seasar-user メーリングリストの案内