use of org.neo4j.kernel.impl.query.TransactionalContextFactory in project neo4j by neo4j.
the class ExecutionEngineTests method createTransactionContext.
private TransactionalContext createTransactionContext(GraphDatabaseQueryService graph, InternalTransaction tx, String query) {
PropertyContainerLocker locker = new PropertyContainerLocker();
TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(graph, locker);
return contextFactory.newContext(ClientConnectionInfo.EMBEDDED_CONNECTION, tx, query, Collections.emptyMap());
}
use of org.neo4j.kernel.impl.query.TransactionalContextFactory in project neo4j by neo4j.
the class Start method createTransactionContext.
private TransactionalContext createTransactionContext(String queryText, Map<String, Object> queryParameters, Session session) {
DependencyResolver dependencyResolver = getDependencyResolver();
GraphDatabaseQueryService graph = dependencyResolver.resolveDependency(GraphDatabaseQueryService.class);
TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(graph, new PropertyContainerLocker());
InternalTransaction transaction = graph.beginTransaction(KernelTransaction.Type.implicit, SecurityContext.AUTH_DISABLED);
return contextFactory.newContext(new ShellConnectionInfo(session.getId()), transaction, queryText, queryParameters);
}
use of org.neo4j.kernel.impl.query.TransactionalContextFactory in project neo4j by neo4j.
the class TransitionalPeriodTransactionMessContainer method create.
public TransactionalContext create(HttpServletRequest request, GraphDatabaseQueryService service, Type type, SecurityContext securityContext, String query, Map<String, Object> queryParameters) {
TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(service, locker);
ClientConnectionInfo clientConnection = HttpConnectionInfoFactory.create(request);
InternalTransaction transaction = service.beginTransaction(type, securityContext);
return contextFactory.newContext(clientConnection, transaction, query, queryParameters);
}
Aggregations