[arquillian-issues] [JBoss JIRA] (ARQ-2049) Database connection closed after first @Test/@UsingDataSet in a class
George Lindholm (JIRA)
issues at jboss.org
Fri Oct 14 16:35:00 EDT 2016
George Lindholm created ARQ-2049:
------------------------------------
Summary: Database connection closed after first @Test/@UsingDataSet in a class
Key: ARQ-2049
URL: https://issues.jboss.org/browse/ARQ-2049
Project: Arquillian
Issue Type: Bug
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha7, persistence_1.0.0.next
Environment: arquillian-openejb-embedded-4 (4.7.4), derby 10, hibernate 4, java 8
Reporter: George Lindholm
Assignee: Bartosz Majsak
Once ARQ-2042 was resolved, I rebuilt arquillian-persistence against the new arquillian-core
and ran into a problem where the database connection was being closed once the first test
in my class had finished. I see the same pattern in some of the integration tests so I don't
know what is different with my environment (other than openejb-embedded).
After a lot of debugging I finally narrowed the problem down to this change from Alpha6:
{code}
private void createDatabaseConnection() {
try {
if (databaseConnectionProducer.get() != null
&& !databaseConnectionProducer.get().getConnection().isClosed()) {
closeDatabaseConnection();
}
{code}
to Alpha7:
{code}
private void createDatabaseConnection() {
if (databaseConnectionProducer.get()== null) {
configureDatabaseConnection();
}
}
private void configureDatabaseConnection() {
try {
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the arquillian-issues
mailing list