Thank you Ron. All of my service calls are usually sub-second, so the default timeouts are normally all I need.
This one method is fairly unique. Its purpose is for the client to send errors that happened in a huge batch client process to the server, and the server inserts those errors into a database table. Most of the time there are none or a few errors, and the service call takes less than a second. But there is a rarely occurring condition where there could be 1000 or more errors being reported from the client to the server, meaning 1000 database inserts... and that obviously takes a while. Of all the options you gave me, I think the @OneWay annotation would be the best, and seems like it will do the trick for my situation. But I think I hit into a need that would make for a nice CXF enhancement. It would be great if the CXF developers could add a @Timeout annotation that can be applied to individual method calls. Could you point me to the right channels to suggest such an enhancement? bruno -----Original Message----- From: Ron Grimes [mailto:[email protected]] Sent: Monday, October 19, 2009 4:39 PM To: [email protected] Subject: RE: Increase timeout for a service method There are multiple places you have to set timeout values. I don't know your exact configuration, but as an example, timeouts can be set in the container (such as Tomcat) config files, or at the firewall level, or at the reverse proxy level. So, you may have to set them multiple places, depending on your setup. I'm using CXF with spring and annotations and have never had to set any timeout values at that level, but the ones mentioned above, yes. As alternatives, you might evaluate whether the client truly requires a response. In such a case, try exploring the @OneWay annotation. If the client does need a response, but not immediately, another idea is to explore a push technology where you could execute the service operation via a @OneWay annotation, but tie your client to a server side push mechanism that would push out the results when the service is done executing. I'm thinking BlazeDS in this instance, which works with Flex client side. So, obviously, if you're using a different client side solution, then you would have to search for a different push technology solution to incorporate. I try to shoot for 1-5 sec response on all client side requests to services, and never taking longer than 20 seconds and that's only if I'm producing a dynamic PDF to open on the client side. Longer than that, and it's a good idea to try one of the above methods. R. Grimes ________________________________________ From: Bruno Melloni [[email protected]] Sent: Monday, October 19, 2009 3:07 PM To: [email protected] Subject: Increase timeout for a service method I have a service written in CXF, Spring and annotations - as in the 'Writing a service with Spring' of the documentation. Under unusual circumstances, one of the methods of the service can take a long time to run, so I need to increase the timeout. Logic would seem to indicate that when working with the Spring + Annotations approach, this would be done via an annotation above the method declaration. But I couldn't find it. Can someone please point me to the Annotation and its syntax? Thanks, b.
