Hi,Marcel Ruff
        
Our purpose is as follows:  If client throw user.upate.error, the server will resend 
the message;
 
   I trace the client side kernel file "CorbaCallbackServer.java'" and the server side 
correspond file "CallbackCorbaDriver.java"
   
   CorbaCallbackServer.java
  1  try {
  2       // convert Corba to internal MsgUnitRaw and call update() ...
  3       MsgUnitRaw[] localMsgUnitRawArr = CorbaDriver.convert(glob, msgUnitArr);
  4        //log.error(ME, "DEBUG ONLY: " + localMsgUnitRawArr[0].toXml());
  5        return boss.update(cbSessionId, localMsgUnitRawArr);
  6    }
  7    catch(XmlBlasterException e) {
  8       log.warn(ME, "Delivering message to client failed, message is not handled by 
client: " + e.toString());
  9       throw CorbaDriver.convert(e); // convert to 
org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException
  10    }
  11    catch (Throwable e) {
  12       log.warn(ME, "Delivering message to client failed, message is not handled 
by client: " + e.toString());
  13       e.printStackTrace();
  14       throw CorbaDriver.convert(new XmlBlasterException(glob, 
ErrorCode.USER_UPDATE_ERROR, ME,
  15                                 "Delivering message to client failed, message is 
not handled by client: " + e.toString()));
  16    }
  
  
  
when i use the following code in my client provided update() method as follows:

  "throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, "PKYTEST");"
  
  the control goes to CorbaCallbackServer.java line 7, i find line 9 throw null, 
  and the CallbackCorbaDriver.java control goes to line 31, I think the control should 
  go to line 14.
  
  
 
  
1  public final String[] sendUpdate(MsgUnitRaw[] msgArr) throws XmlBlasterException {
2    if (msgArr == null || msgArr.length < 1 || msgArr[0] == null) {
3        Thread.currentThread().dumpStack();
4        throw new XmlBlasterException(glob, ErrorCode.INTERNAL_ILLEGALARGUMENT, ME, 
"Illegal sendUpdate() argument");
5     }
6
7     org.xmlBlaster.protocol.corba.serverIdl.MessageUnit[] updateArr = new 
org.xmlBlaster.protocol.corba.serverIdl.MessageUnit[msgArr.length];
8    for (int ii=0; ii<msgArr.length; ii++) {
9       updateArr[ii] = convert(msgArr[ii]);
10    }
11
12    try {
13        return this.cb.update(callbackAddress.getSecretSessionId(), updateArr);
14      } catch (org.xmlBlaster.protocol.corba.serverIdl.XmlBlasterException ex) {
15         XmlBlasterException xmlBlasterException = CorbaDriver.convert(glob, ex);
16
17         // WE ONLY ACCEPT ErrorCode.USER... FROM CLIENTS !
18         if (xmlBlasterException.isUser())
19            throw xmlBlasterException;
20
21         if (callbackAddress == null) {
22            throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, ME,
23                   "CORBA Callback of " + msgArr.length + " messages failed",
24                   xmlBlasterException);
25         }
26         else {
27            throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, ME,
28                   "CORBA Callback of " + msgArr.length + " messages to client [" +
29                   callbackAddress.getSecretSessionId() + "] failed.", 
xmlBlasterException);
30         }
31      } catch (Throwable e) {
32         if (callbackAddress == null)
33            throw new XmlBlasterException(glob, 
ErrorCode.COMMUNICATION_NOCONNECTION, ME,
34                "CORBA Callback of " + msgArr.length + " messages failed", e);
35         else
36            throw new XmlBlasterException(glob, 
ErrorCode.COMMUNICATION_NOCONNECTION, ME,
37                "CORBA Callback of " + msgArr.length + " messages to client ["
38                 + callbackAddress.getSecretSessionId() + "] failed", e);
39      }
40   }


 The concrete problem of server and client is as follows:
   when i hit a key in publisher and the subscriber will see the message which is 
resent by xmlblaster server,
  and when i increse the hit speed in publisher, the xmlbaster server will resend the 
same message in a loop , this behaviour is error. and the example code is in 
attachment file.
  Following the steps:
  1.java org.xmlBlaster.Main -wipeOutJDBC true -trace true
  2.java psdemo.Subscriber -session.name pky/1 -passwd pky -dispatch/callback/retries 
-1 -multiSubscribe false  -dispatch/callback/pingInterval 2000 -interactiveUpdate true 
-historyNumUpdates 0 -trace false -dispatch/callback/delay 5000 
  3.java psdemo.Publisher -session.name pky -passwd pky -numPublish 100 -persistent 
true
  
  I think the resend logic if error, can u tell me the solution to this problem and 
how to fix it?

note:
                there is a attachment file.
        
  thanks a lot!
        
        
pikaiyuan
[EMAIL PROTECTED]
2003-08-31

Attachment: Publisher.java
Description: Binary data

Attachment: Subscriber.java
Description: Binary data

Reply via email to