Changing scope to singleton for graphDB service

Adding shutdown hook