I get an exception on the SERVER side.
Here's an excerpt from the log:
- Code: Select all
2012-08-27 05:43:47,194 WARN - Exception occurred in NIOHandler for gateway [Primary Gateway] session [18].
net.user1.union.core.upc.i: XML error parsing UPC [^C�]
at net.user1.union.core.upc.UPCParser.parse(SourceFile:37)
at net.user1.union.core.connection.a.b.l.messageReceived(SourceFile:67)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
... more stack trace ... and then
2012-08-27 05:43:47,195 DEBUG - Client [13] is being removed.
2012-08-27 05:43:47,195 DEBUG - Client [13] removed from server after [1520] seconds.
If I call logoff instead, that doesn't happen:
- Code: Select all
2012-08-27 05:36:11,361 DEBUG - Server sending to client [14] message [<U><M>S2C_LOGGED_OFF(u89)</M><L><A>14</A><A><![CDATA[ userid here ]]></A></L></U>]
2012-08-27 05:36:11,361 DEBUG - Client [14] is being removed.
2012-08-27 05:36:11,362 DEBUG - Client [14] removed from server after [1051] seconds.
However, if it so happens you didn't login, which you don't have to do,
since lots of activity can occur from a non-logged-in client (as in all the examples),
then it would seem to put you in a bit of a bind:
call disconnect() and get that exception, OR
don't disconnect, and you might have a heartbeat going,
because you did successfully connect, even though the login failed,
or you didn't even try one.
Also, it seems that logoff disconnects you as well, because the Heartbeat stops.
But considering that you cannot login without connecting first (right?),
that asymmetry is a little strange.
If would be logical, I would think, to be able to do:
connect()
. . . . login(user A)
. . . . logoff()
. . . . login(user B)
. . . . logoff()
disconnect()
rather than
connect - login - logoff (implied disconnect) ...
connect ... login() ... etc.
Any suggestions?