Is "Connection Pool" used only when using a database server such a MySQL on localhost, or a remote server?
For a standalone desktop application (Java SE - I think that is what it is referred to) using Hibernate, Spring and HSQLDB as a File database should I use a Connection Pool? I configured BoneCP, but I think that is causing problems. I keep loosing the connection to the database after adding only a few records to tables.
An excerpt of the console log includes the following:
Code:
Hibernate: insert into Category (id, descr, name) values (default, ?, ?)
Hibernate: insert into Category (id, descr, name) values (default, ?, ?)
Hibernate: insert into Category (id, descr, name) values (default, ?, ?)
Hibernate: insert into Category (id, descr, name) values (default, ?, ?)
Hibernate: insert into Category (id, descr, name) values (default, ?, ?)
Hibernate: insert into Category (id, descr, name) values (default, ?, ?)
WARN 09:01:54,452 [spi.SqlExceptionHelper] SQL Error: -1303, SQLState: 08003
ERROR 09:01:54,453 [spi.SqlExceptionHelper] connection exception: connection does not exist
WARN 09:01:54,454 [spi.SqlExceptionHelper] SQL Error: -1303, SQLState: 08003
ERROR 09:01:54,454 [spi.SqlExceptionHelper] connection exception: connection does not exist
ERROR 09:01:54,455 [interceptor.TransactionInterceptor] Application exception overridden by rollback exception
org.hibernate.exception.JDBCConnectionException: connection exception: connection does not exist
I suspect the connection pool is causing the errors. Ideas?
The dependencies in my POM (an excerpt) include:
Code:
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>3.1.2.RELEASE</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.9.Final</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>com.jolbox</groupId>
<artifactId>bonecp-provider</artifactId>
<version>0.8.0-alpha1</version>
</dependency>
Thanks,
Jim