summaryrefslogtreecommitdiff
path: root/gnu/CORBA
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2006-04-09 17:04:49 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2006-04-09 17:04:49 +0000
commit9fde5c73cc0f06b36e7995cb74d996ae37f98c88 (patch)
tree7d89b1193dc10ec67105ce2d5ba5ff0987759402 /gnu/CORBA
parent21138c8683f8e2051b1960e24e00a4ef299f219d (diff)
downloadclasspath-9fde5c73cc0f06b36e7995cb74d996ae37f98c88.tar.gz
2006-04-09 Audrius Meskauskas <AudriusA@Bioinformatics.org
* gnu/CORBA/gnuRequest.java (submit): Do not read any response after one way message and retry after any IOException.
Diffstat (limited to 'gnu/CORBA')
-rw-r--r--gnu/CORBA/gnuRequest.java27
1 files changed, 8 insertions, 19 deletions
diff --git a/gnu/CORBA/gnuRequest.java b/gnu/CORBA/gnuRequest.java
index f6c011a70..0b3338d34 100644
--- a/gnu/CORBA/gnuRequest.java
+++ b/gnu/CORBA/gnuRequest.java
@@ -594,7 +594,7 @@ public class gnuRequest extends Request implements Cloneable
{
final gnuRequest cloned = Clone();
cloned.oneWay = true;
-
+
new Thread()
{
public void run()
@@ -788,20 +788,21 @@ public synchronized RawReply submit()
if (socket == null)
{
- // The BindException may be thrown under very heavy parallel
+ // The IOException may be thrown under very heavy parallel
// load. For some time, just wait, exceptiong the socket to free.
Open: for (int i = 0; i < PAUSE_STEPS; i++)
{
try
{
if (orb instanceof OrbFunctional)
- socket = ((OrbFunctional) orb).socketFactory.createClientSocket(
- ior.Internet.host, ior.Internet.port);
+ socket = ((OrbFunctional) orb).socketFactory.
+ createClientSocket(
+ ior.Internet.host, ior.Internet.port);
else
socket = new Socket(ior.Internet.host, ior.Internet.port);
break Open;
}
- catch (BindException ex)
+ catch (IOException ex)
{
try
{
@@ -833,23 +834,11 @@ public synchronized RawReply submit()
request_part.buffer.writeTo(socketOutput);
socketOutput.flush();
- if (!socket.isClosed())
+ if (!socket.isClosed() && !oneWay)
{
MessageHeader response_header = new MessageHeader();
InputStream socketInput = socket.getInputStream();
- try
- {
- response_header.read(socketInput);
- }
- catch (MARSHAL eof)
- {
- // If the message is sent one way, we do not care about the
- // response that may never come.
- if (oneWay && eof.minor == Minor.EOF)
- return EMPTY;
- else
- throw eof;
- }
+ response_header.read(socketInput);
byte[] r;
if (orb instanceof OrbFunctional)