JAVA-793: Fixed race condition in DBTCPConnector.authenticate by putting in a call to checkMaster prior to getting a DBPort to authenticate on.
JAVA-802: Use $query and $orderby in query document instead of query and orderby