Added exception handler to lock-queue call. Added transaction to create db in tdb