Re: New to BEEP

Walt Stoneburner <[email protected]> Mon, 26 May 2003 01:41:36 -0400
Newsgroups gmane.network.beep.beepcore.java.general
Message-ID <[email protected]>
"Grant Wood" <grant@na...> writes:
  > When I do this, the listener on my "server" calls startChannel() so I
  > assume the session is getting established fine.  Everything hangs at
  > this point without any errors.

Huston / Grant,

   I've just spent the last few hours debugging the identical symptoms
   using the latest beepcore-0.9.07.tgz on OS X using JRE 1.4.1_01.

   In my code, startChannel(), from the StartChannelListener interface,
   has one job to do:
                       channel.setMessageListener(this);

   It is this function that hangs, not startChannel().

   Stepping through the implementation shows that this call invokes
   org.beepcore.beep.code.Channel.setMessageListener() with one
   argument: ml.

   setMessageListener then turns around and immediately invokes the
   PROTECTED signature of the same function,
   org.beepcore.beep.core.Channel.setMessageListener(), although it
   now takes two arguments: ml and blocking.

   blocking is set to true.

     When I step forward, getMessageListener() is called, which
       ...sometimes it hangs indefinitely.
       ...sometimes causes Java to report an array index out of bounds.
       ...sometimes it proceeds to ThreadedMessageListener().

   If I intercept the thread of execution _before_ setMessageListener()
   is invoked and coerce the argument blocking to false via the debugger,
   the code seems to proceed without hanging.


   What's curious is that setMessageListener(ml) always invokes
   setMessageListener(ml,blocking) with blocking set to true.  To the 
best
   of my limited knowledge, the conditional code always executes the 
positive
   conditional path in Channel.java.

   Hope this helps in unwraveling Grant's mystery hang (and mine too).

-Walt Stoneburner, <[email protected]>



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge