case TCP:
_instance = new SocketTransportConnection(new SocketTransportConnection.SocketConnectorFactory()
{
public IoConnector newSocketConnector()
{
SocketConnector result;
//FIXME - this needs to be sorted to use the new Mina MultiThread SA.
if (Boolean.getBoolean("qpidnio"))
{
_logger.warn("Using Qpid NIO - DISABLED");
// result = new org.apache.qpid.nio.SocketConnector(); // non-blocking connector
}
// else
{
_logger.warn("Using Mina NIO");
result = new SocketConnector(); // non-blocking connector
}
// Don't have the connector's worker thread wait around for other connections (we only use
// one SocketConnector per connection at the moment anyway). This allows short-running
// clients (like unit tests) to complete quickly.
result.setWorkerTimeout(0);
return result;
}
});
break;