I am working on a project that uses MINA to communicate with a wide
variety of data collection devices, average and uniformly format that
data, and then send it upstream to another portion of our application.
As a result, I am constantly dealing with multiple ports (serial and
socket) and multiple protocol handlers and doing "discovery" on each
port trying different protocol handlers in series until one recognizes
the data stream.
This process appears to be working fairly well on socket-based ports.
However, every failed discovery cycle (and it's expected to have many
times many over the program lifetime) leaves behind one or more threads
in Waiting state (visible in JProfiler).
Chasing this bug led to finding another....
When I have several protocol handlers and just one serial port (and
especially when the device on that port is turned off) the multiple
attempts (each using a new IoSession) to attach handlers starts to break
down. One handler gets access to the serial port, some (varies)
number of handlers get SerialPortUnavailableExceptions.
I've tried timed delays between one handler's failure and the next's
attempt. That seems to reduce the number of Exceptions but not
eliminate them. The reduction can be seen with a 3 second delay,
tried increasing as far as 20 seconds without seeing detectably more
reduction.
So, two issues, two questions:
1) Do I need to do anything special for serial that I don't need for
socket connections, when attempting different protocol handlers on the
same hardware port (new IoConnector's same IoAddress)
2) Is there a defined process for re-using an IoConnector??
Thanks in advance,
boB Gage
--
boB Gage
Software Engineer
Merge Healthcare
This message is a PRIVATE communication. This message and all
attachments are a private communication and may be confidential or
protected by privilege. If you are not the intended recipient, you are
hereby notified that any disclosure, copying, distribution or use of the
information contained in or attached to this message is strictly
prohibited. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.