[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] catching exceptions with publishOneway



Michael Atighetchi wrote:

I'm using publishOney to publish messages asynchronously to a
xmlblaster node. When the connection to the node goes down, I see the
following stack trace in the client

org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to xxx.xxx.xxx.xxx:56061  vmcid: 0x0  minor code: 0  completed: No
       at org.jacorb.orb.connection.Client_TCP_IP_Transport.connect(Client_TCP_IP_Transport.java:178)
       at org.jacorb.orb.connection.TCP_IP_Transport.write(TCP_IP_Transport.java:302)
       at org.jacorb.orb.connection.GIOPConnection.write(GIOPConnection.java:516)
       at org.jacorb.orb.CDROutputStream.write(CDROutputStream.java:278)
       at org.jacorb.orb.connection.ServiceContextTransportingOutputStream.write_to(ServiceContextTransportingOutputStream.java:153)
       at org.jacorb.orb.connection.GIOPConnection.sendMessage(GIOPConnection.java:565)
       at org.jacorb.orb.connection.GIOPConnection.sendRequest(GIOPConnection.java:547)
       at org.jacorb.orb.connection.ClientConnection.sendRequest(ClientConnection.java:232)
       at org.jacorb.orb.Delegate$1.run(Delegate.java:902)
       at java.lang.Thread.run(Thread.java:536)

Hi Michael,

as the stack trace shows us it is deeply nested inside a JacORB thread.
In other words: The exception never reaches xmlBlaster code for
oneway CORBA invocations. So we have no chance to detect this.

The client dispatcher framework handles the rest well:
 o If you wait some seconds the ping() will fail
 o The fail safe code changes to POLLING
 o When the server is available again it will reconnect to xmlBlaster

-> You loose silently all oneway messages until the ping detects a problem
-> In POLLING state the client side queue will storte savely all oneway publish
-> All queued oneway publish messages will be sent on reconnect


Try playing (with newest cvs):

java org.xmlBlaster.Main -call[core] true

java javaclients.HelloWorldPublish -numPublish 100 -oneway true

and shutdown/restart the server during interactive publishing


I didn't check the CORBA spec if hiding the exception of oneway errors is OK or if there are any configuration possibilities.

best regards

Marcel

PS: If you use the SOCKET protocol it works fine.



However, neither reachedDead for this connection is called, nor
does the publishOneway call throw an exception.

Could we change the connection handling of publishOneway to be exactly
the same as for publish, i.e. throwing exceptions and calling
reachedDead ?

Michael