axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron.Kn...@vodafone.co.nz
Subject System.exit in axis code
Date Sun, 22 Jun 2003 21:08:49 GMT
On line 106 of RPCParam.java, there is a System.exit(-1) in the static
initialiser.  I am not yet certain whether or not it is related, but my web
service client has begun exiting every time it tries to make a RPC call.
The only way the JVM could exit here is via a System.exit() or a JVM crash,
since I have surrounded this block with a catch Throwable and write a log
message (which does not appear).

Regardless of whether or not this piece of code is the culprit, I hardly
need to point out that putting System.exit in server-side code is _always_
a terrible idea.  Bearing in mind that you are sharing your runtime
environment with any number of other apps, you are basically saying that if
your code won't work, no-one else's code will either.

So, /please/, replace this System.exit() with an appropriate exception and
/please/ do not put in any more System.exit()'s outside of a command-line
main method!

Here is a quick hack fix for RPCParam.java.  There seems to be a similar
problem with WSDL2.java, but I have yet to investigate that properly.

(See attached file: RPCParam.java)

Cheers

ADK


--------------------------------------------

There is no magic.
-----------------------------------------------------------------------------------------------
Have you seen our website?.... http://www.vodafone.co.nz

CAUTION: This correspondence is confidential and intended for the named recipient(s) only.
If you are not the named recipient and receive this correspondence in error, you must not
copy,
distribute or take any action in reliance on it and you should delete it from your system
and
notify the sender immediately.  Thank you.

Unless otherwise stated, any views or opinions expressed are solely those of the author and
do
not represent those of Vodafone New Zealand Limited.

Vodafone New Zealand Limited
21 Pitt Street, Private Bag 92161, Auckland, 1020, New Zealand
Telephone + 64 9 357 5100
Facsimile + 64 9 377 0962

Mime
View raw message