Skip to main content

Webservice Client Timeout?

5 replies [Last post]
batzee
Offline
Joined: 2006-11-28

Today I had a very strange problem on my production system (Glassfish 2 UR1):

My EJB3 Stateless Bean is called regularly every 5 minutes by the TimerService. Then the bean calls an external web service which is imported using the @WebServiceRef annotation, filters the result and stores it in internal JPA Entity Beans. Normally this works fine.

Today the customer tells me that there are no data updates coming anymore. The last update came on April 30, 12:00.

asadmin generate-jvm-report type=thread tells me that the timer thread is hanging in the web service call, waiting for the SOAP reply.

But how can it be that it waits for an entire week for a SOAP reply, without throwing a timeout or anything? And how can it be that the timerService stops calling the bean every 5 minutes, without writing anything to the log file?

What can I do in order to see this error never again???

Thank you very much in advance

Bastian

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
batzee
Offline
Joined: 2006-11-28

C'mon guys ...

If no one replies I will file this as a bug report.

mvatkina
Offline
Joined: 2005-04-04

Everybody is at JavaOne...

Are you asking for a timeout of a @Timeout call? It's not currently possible. The EJB Timer waits for the @Timeout callback to complete to calculate the next time of the call. You might want to redesign your app in such a way that the method marked for timeout doesn't hold the thread.

Regards,
-marina

batzee
Offline
Joined: 2006-11-28

Marina, thanks for your reply.

I understand the semantics of @Timeout now, and I think it is the right thing.

However, I still don't understand how calling an external webservice which apparently does not reply or does not complete its reply can hold the timer thread for several days! There should definitely be a SOAP timeout

mk111283
Offline
Joined: 2005-03-29

Hi Batzee,
Forwarded this to the WS team

bhaktimehta
Offline
Joined: 2004-03-18

I checked with jitu and he mentioned jaxws has following properties for timeouts Check this document. https://metro.dev.java.net/guide/HTTP_Timeouts.html You can set the request/connection timeouts accordingly
Regards,
Bhakti