나는 이해력이있다. "getOrCreateNode()"와 같은 Neo4jTemplate의 데이터베이스 작업이 주변 트랜잭션에 속한 방식을 이해할 수 없습니다. 어떻게 구현됩니까? Neo4jTemplate은 멀티 스레드 환경에서 공유됩니까? 거래의 고유 회원을 볼 수 없습니다. 작업이 트랜잭션 개체 (예 : tx.getOrCreateNode())에 직접 있는지 이해할 수 있습니다.Spring Data Neo4j는 트랜잭션 작업을 어떻게 시작합니까?
@Service
public class TestService {
@Autowired
private Neo4jTemplate template;
public void save(IndexedTriple triple) {
GraphDatabase gdb = template.getGraphDatabase();
Transaction tx = gdb.beginTx();
Node subject = gdb.getOrCreateNode()
...
tx.success();
tx.finish();
}
}
미리 감사드립니다.