Hi All,

I want to test transaction with Apache Ignite SQL table. For this I created
a small program. What the program does is

1. Start a ignite server node from the code itself.
2. Create a JDBC url to local ignite server
3. Get a JDBC connection, create the table
4. Get a JDBC connection, set  auto commit to false, insert few records,
then close the connection without committing.
5. Create a new jdbc connection, execute select query.

Output: As auto commit is set to false, after closing the connection, the
select query should have returned is returning records.

Expected Output: The select query should have returned no records, as auto
commit is set to false, and connection is not committed.

Ignite Version 2.7.0

Attaching
1. the sample code
2. pom.xml


Any help is appreciated.

Thanks
Arpit
<project xmlns="http://maven.apache.org/POM/4.0.0";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.arpit.projects</groupId>
	<artifactId>ignite-db-demo</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>ignite-db-demo</name>
	<url>http://maven.apache.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<ignite.version>2.7.0</ignite.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.apache.ignite</groupId>
			<artifactId>ignite-core</artifactId>
			<version>${ignite.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.ignite</groupId>
			<artifactId>ignite-spring</artifactId>
			<version>${ignite.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.ignite</groupId>
			<artifactId>ignite-indexing</artifactId>
			<version>${ignite.version}</version>
		</dependency>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.10</version>
		</dependency>
	</dependencies>
	<repositories>
		<repository>
			<id>GridGain External Repository</id>
			<url>http://www.gridgainsystems.com/nexus/content/repositories/external</url>
		</repository>
	</repositories>
</project>

Attachment: SomeClass.java
Description: Binary data

Reply via email to