added locking
solving pom warnings and adding orient db