Fix for oracle not supporting generatedkeys method

Used a select query after inserting a queue to DB to get the queue id.
This is to avoid subtle differences in different DB vendors jdbc driver
in returning generated key for queue id.