Return-Path: Delivered-To: apmail-incubator-cxf-user-archive@locus.apache.org Received: (qmail 74351 invoked from network); 4 Mar 2008 07:01:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 07:01:12 -0000 Received: (qmail 85482 invoked by uid 500); 4 Mar 2008 07:01:07 -0000 Delivered-To: apmail-incubator-cxf-user-archive@incubator.apache.org Received: (qmail 85445 invoked by uid 500); 4 Mar 2008 07:01:07 -0000 Mailing-List: contact cxf-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-user@incubator.apache.org Delivered-To: mailing list cxf-user@incubator.apache.org Received: (qmail 85436 invoked by uid 99); 4 Mar 2008 07:01:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 23:01:07 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christopher.sw.cheng@gmail.com designates 209.85.198.188 as permitted sender) Received: from [209.85.198.188] (HELO rv-out-0910.google.com) (209.85.198.188) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 07:00:28 +0000 Received: by rv-out-0910.google.com with SMTP id k20so370869rvb.0 for ; Mon, 03 Mar 2008 23:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=/TnQWCkv/cWstD95ZleD07oOtSrYV0erFb3VaMDPlWE=; b=MEr2FF/WGPxHuwJJMA61jD08SF+h7CUOoHM5FLGRYRXMffqo/S5eISIrQ99PL9h+QfIeg44UL+RyLHIdsf7WHfB3K9SAdrPZNIYCJLVJRha0+qoX5meZXXFOVynU88PeaQNxtV1ZiaVhQifOWSPU03KUfifFu0+lhcRBW49idp8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WJ7Yvi2q80iadgh98JLmwXlEko64TcKStq5uaRFsx6TX9gOSLAkBJrnL+yE5Tf8q2J716x0sCSTfnDtlcgbcpHfKLX/OaWUG5ZH3lsZ/GK0wZWsOLavfTnHk4Mih8JFMc+BLgWZfGzAq6TKZ+80ZpaHHFS6c4x1JCKNPqegVpuI= Received: by 10.141.211.13 with SMTP id n13mr484166rvq.184.1204614038338; Mon, 03 Mar 2008 23:00:38 -0800 (PST) Received: by 10.140.135.10 with HTTP; Mon, 3 Mar 2008 23:00:38 -0800 (PST) Message-ID: Date: Tue, 4 Mar 2008 15:00:38 +0800 From: "Christopher Cheng" To: "Daniel Kulp" , cxf-user@incubator.apache.org Subject: Re: service caching In-Reply-To: <200803031548.40658.dkulp@apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21267_615971.1204614038372" References: <15773252.post@talk.nabble.com> <200803031548.40658.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_21267_615971.1204614038372 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I haven't read the codes of Axis, but I have been using it for 2 years and it doesn't have this problem. Having an overhead for 5-8 seconds is not an option for a production system in term of performance What you are saying is that all the services must implement Clonable interface? On Tue, Mar 4, 2008 at 4:48 AM, Daniel Kulp wrote: > > Christopher, > > We cannot just "reuse" the Service model objects as they are completely > modifiable at runtime. For example, one proxy could be reconfigured with > new address or have additional interceptors added or similar. Those > shouldn't affect others. > > On option that propably would make sense is to add a fast "clone" > functionality to the entire service model so we could cache one, and > then clone it whenever one is really needed. All the individual > versions could be modified and not affect the original. However, doing > that would be quite a bit of work as there are a LOT of classes that > would need to be updated to support that. > > Patches towards that end would be great. :-) > > Dan > > > On Monday 03 March 2008, Christopher Cheng wrote: > > wsdl is indeed cached in WSDLManagerImpl.definitionsMap > > > > After reading the codes, I have some questions. My workstation is a > > PentiumD 3GHz with 1.5GB RAM > > > > In the class > > "org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServ > >iceFromWSDL(String url)", > > "setService(factory.create());" takes 3 seconds > > "getDataBinding().initialize(getService());" takes 2 seconds > > > > These 2 methods are called even in 2nd calls. Can you also cache the > > services perhaps using jakarta commons-pool? or eh-cache? > > > > By the way, I found that the wsdl is put into the definitionMap twice > > if " WSDLManagerImpl.getDefinition(URL url)" is called. First in > > "getDefintion(URL url)" at line 147 and second in > > "loadDefinition(String url)" at line 201. > > > > > > On Mon, Mar 3, 2008 at 4:22 PM, Christopher Cheng < > > > > christopher.sw.cheng@gmail.com> wrote: > > > wsdl is indeed cached in WSDLManagerImpl.definitionsMap > > > > > > After reading the codes, I have some questions. My workstation is a > > > PentiumD 3GHz with 1.5GB RAM > > > > > > In the class " > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildSer > > >viceFromWSDL(String url)", > > > "setService(factory.create());" takes 3 seconds > > > "getDataBinding().initialize(getService());" takes 2 seconds > > > > > > These 2 methods are called even in 2nd calls. Can you also cache the > > > services perhaps using jakarta commons-pool? or eh-cache? > > > > > > By the way, I found that the wsdl is put into the definitionMap > > > twice if " WSDLManagerImpl.getDefinition(URL url)" is called. First > > > in "getDefintion(URL url)" at line 147 and second in > > > "loadDefinition(String url)" at line 201. > > > > > > > > > > > > On Mon, Mar 3, 2008 at 9:43 AM, Willem Jiang > > > > > > > > > wrote: > > > > Hi, > > > > > > > > I just went through the code, we really cache the WSDL definition > > > > in CXF. > > > > Could you send your test case and wsdl file to me ? I may need to > > > > trace it for more information. > > > > > > > > Regards, > > > > > > > > Willem > > > > > > > > Christopher Cheng wrote: > > > > > I think the issue is still there. I used a for loop to execute > > > > > the > > > > > > > > same > > > > > > > > > call, all takes approximately the same time to create service. I > > > > > guess > > > > > > > > that > > > > > > > > > the service itself is not cached. > > > > > > > > > > On Sun, Mar 2, 2008 at 11:43 AM, Willem Jiang > > > > > > > > > > > > > > > wrote: > > > > >> Here is the JIRA[1] which describe the same thing that you > > > > >> want. I don't know if it was really resolved, could you try the > > > > >> latest released CXF 2.0.4 for it. > > > > >> > > > > >> If the issue is still there, please let me know , I will put it > > > > >> to my next week todo list. > > > > >> > > > > >> [1]https://issues.apache.org/jira/browse/CXF-699 > > > > >> [2]http://cwiki.apache.org/CXF/download.html > > > > >> > > > > >> Willem. > > > > >> > > > > >> Christopher Cheng wrote: > > > > >>> I am migrating from Axis1.2 to CXF 2.0.3 > > > > >>> > > > > >>> I understand that it will take a long time to build for the > > > > >>> first > > > > > > > > time. > > > > > > > > >> What > > > > >> > > > > >>> I am wondering is that why it takes so long for the second and > > > > >>> third > > > > >> > > > > >> time? > > > > >> > > > > >>> Is there any caching of services? Axis does not seem to have > > > > >>> this > > > > > > > > issue. > > > > > > > > >>> Christopher Cheng wrote: > > > > >>>> Attached is the log > > > > >>>> > > > > >>>> ----- Original Message ----- > > > > >>>> From: "Willem Jiang" > > > > >>>> To: > > > > >>>> Sent: Saturday, March 01, 2008 8:53 PM > > > > >>>> Subject: Re: service caching? > > > > >>>> > > > > >>>>> Hi > > > > >>>>> > > > > >>>>> Could you set the logger level to FINE ? > > > > >>>>> So we can get more information about the service publishing. > > > > >>>>> > > > > >>>>> Willem. > > > > >>>>> > > > > >>>>> Christopher Cheng wrote: > > > > >>>>>> When I call the service as a client, it takes 5 seconds to > > > > >>>>>> load. > > > > > > > > I am > > > > > > > > >>>>>> not > > > > >>>>>> sure whether it takes 5 seconds to create the service or it > > > > >>>>>> takes > > > > > > > > 5 > > > > > > > > >>>>>> seconds > > > > >>>>>> to look up for ciper filters. I am wondering if the > > > > >>>>>> services are cached... > > > > >>>>>> Feb 29, 2008 2:14:42 PM > > > > >>>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean > > > > >>>>>> buildServiceFromWSDL > > > > >>>>>> INFO: Creating Service > > > > >>>>>> {https://webservices.sabre.com/websvc}OTA_HotelAvailService > > > > >>>>>> > > > >>>>>>e> > > > > > > > > from > WSDL: > > > > >>>>>> file:/C:/Java/abacus-webconnect-1.14.0.rc1 > > > > >> > > > > >> /wsdl/OTA_HotelAvailLLS1.4.1RQ.wsdl > > > > >> > > > > >>>>>> Feb 29, 2008 2:14:47 PM > > > > >>>>>> org.apache.cxf.transport.https.SSLUtils getCiphersuites > > > > >>>>>> INFO: The cipher suites have not been configured, falling > > > > >>>>>> back to > > > > >> > > > > >> cipher > > > > >> > > > > >>>>>> suite filters. > > > > >>>>>> Feb 29, 2008 2:14:47 PM > > > > >>>>>> org.apache.cxf.transport.https.SSLUtils getCiphersFromList > > > > >>>>>> INFO: The cipher suites have been set to > > > > > > > > SSL_RSA_WITH_RC4_128_MD5, > > > > > > > > >>>>>> SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH_DES_CBC_SHA, > > > > >>>>>> SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, > > > > >>>>>> SSL_RSA_EXPORT_WITH_RC4_40_MD5, > > > > > > > > SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, > > > > > > > > >>>>>> SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, > > > > >>>>>> SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, > > > > >>>>>> SSL_RSA_WITH_NULL_MD5, SSL_RSA_WITH_NULL_SHA, > > > > >>>>>> SSL_DH_anon_WITH_RC4_128_MD5, > > > > >>>>>> TLS_DH_anon_WITH_AES_128_CBC_SHA, > > > > > > > > SSL_DH_anon_WITH_3DES_EDE_CBC_SHA, > > > > > > > > >>>>>> SSL_DH_anon_WITH_DES_CBC_SHA, > > > > >>>>>> SSL_DH_anon_EXPORT_WITH_RC4_40_MD5, > > > > >>>>>> SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA, > > > > >>>>>> TLS_KRB5_WITH_DES_CBC_SHA, TLS_KRB5_WITH_DES_CBC_MD5, > > > > >>>>>> TLS_KRB5_EXPORT_WITH_RC4_40_SHA, > > > > >>>>>> TLS_KRB5_EXPORT_WITH_RC4_40_MD5, > > > > > > > > TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA, > > > > > > > > >>>>>> TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5. Feb 29, 2008 2:14:48 > > > > >>>>>> PM > > > > > > > > org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallbackon > > > >Close > > > > > > > > >>>>>> I have put this in my cxf.xml as in > > > > >>>>>> http://cwiki.apache.org/CXF20DOC/client-http-transport.html > > > > >>>>>>, but > > > > > > > > it > > > > > > > > >>>>>> doesn't > > > > >>>>>> help... > > > > >>>>>> > > > >>>>>> secureSocketProtocol="SSL"> > > > > >>>>>> > > > > > > > > >>>>>> .*_EXPORT_.* > > > > >>>>>> .*_EXPORT1024_.* > > > > >>>>>> .*_WITH_DES_.* > > > > >>>>>> .*_WITH_NULL_.* > > > > >>>>>> .*_DH_anon_.* > > > > >>>>>> > > > > >>>>>> > > > > >>>>>> > > > > >>>> > > > > >>>> http://www.nabble.com/file/p15773252/cxf.log cxf.log > > > > -- > J. Daniel Kulp > Principal Engineer, IONA > dkulp@apache.org > http://www.dankulp.com/blog > ------=_Part_21267_615971.1204614038372--