Ted Yu created BEAM-1962:
----------------------------
Summary: Connection should be closed in case start() throws
exception
Key: BEAM-1962
URL: https://issues.apache.org/jira/browse/BEAM-1962
Project: Beam
Issue Type: Bug
Components: sdk-java-extensions
Reporter: Ted Yu
Assignee: Davor Bonaci
Priority: Minor
In JmsIO#start() :
{code}
try {
Connection connection;
if (spec.getUsername() != null) {
connection =
connectionFactory.createConnection(spec.getUsername(),
spec.getPassword());
} else {
connection = connectionFactory.createConnection();
}
connection.start();
this.connection = connection;
} catch (Exception e) {
throw new IOException("Error connecting to JMS", e);
}
{code}
If start() throws exception, connection should be closed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)