Session Java object

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Session Java object

Alvin Wang


It seems there is only one way to create a Session object in Java:
public static native Session lookupSession(SessionID sessionID);

But if the session is not completely built up yet (for example, the sequence numbers cannot be agreed on and counterparty sends logout message in response my logon message), lookupSession will return null.  Therefore, I cannot use the following messages to try to check the status and adjust SeqNum....
  public native boolean isEnabled();
  public native boolean sentLogon();
  public native boolean sentLogout();
  public native boolean receivedLogon();
  public native boolean isLoggedOn();
  public native void reset() throws IOException;
  public native void setNextSenderMsgSeqNum(int int0) throws IOException;
  public native void setNextTargetMsgSeqNum(int int0) throws IOException;

So I wonder how to check the status and adjust SeqNum without a session object being created succesfully?

BTW, It seems that a logout message does not invoke fromAdmin callback:
public void fromAdmin(Message message, SessionID sessionID)  

But the logon message invokes toAdmin callback.

I wonder if there is a bug?

Thanks a lot!
********************************************************************** This e-mail message is intended solely for the use of the addressee. The message may contain information that is privileged and confidential. Disclosure to anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail (including the original message with your reply) and then delete and discard all copies of the message. We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by software viruses. **********************************************************************