Skip to content

Commit

Permalink
2.6.6 final I hope
Browse files Browse the repository at this point in the history
  • Loading branch information
Giles authored and Giles committed Dec 16, 2017
1 parent d5bbe03 commit bca5545
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
</transformers>
<artifactSet>
<includes>
<include>ojdbc6:ojdbc6</include>
<include>com.oracle:*</include>
<include>org.apache.commons:*</include>
<include>commons-*:*</include>
<include>com.rabbitmq:*</include>
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/servicenow/common/datamart/ResourceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ static Connection getNewConnection() {

static Connection getNewConnection(DatamartConfiguration config) {
try {
String driver = config.getString("driver", "");
if (driver.length() > 0) {
logger.info("driver=" + driver);
Class.forName(driver);
}
String dburl = config.getRequiredString("url");
String dbuser = config.getRequiredString("username");
String schema = config.getString("schema");
Expand All @@ -133,6 +138,8 @@ static Connection getNewConnection(DatamartConfiguration config) {
}
catch (SQLException e) {
throw new ResourceException(e);
} catch (ClassNotFoundException e) {
throw new ResourceException(e);
}
}

Expand Down
20 changes: 14 additions & 6 deletions src/main/java/servicenow/common/datamart/SqlGenerator.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package servicenow.common.datamart;
package servicenow.common.datamart;

import java.io.*;
import java.util.*;
Expand Down Expand Up @@ -46,11 +46,19 @@ public class SqlGenerator {
public SqlGenerator(DatamartConfiguration config, DatabaseWriter database)
throws ResourceException, SQLException {
InputStream sqlConfigStream;
sqlConfigStream =
ClassLoader.getSystemResourceAsStream(
config.getString("templates", "sqltemplates.xml"));
if (sqlConfigStream == null)
throw new ResourceException("Unable to locate resource: sqltemplates.xml");
String templatesName = config.getString("templates", "");
if (templatesName.length() > 0)
try {
sqlConfigStream = new FileInputStream(templatesName);
}
catch (IOException e) {
throw new ResourceException(e);
}
else {
sqlConfigStream = ClassLoader.getSystemResourceAsStream("sqltemplates.xml");
if (sqlConfigStream == null)
throw new ResourceException("Unable to locate resource: sqltemplates.xml");
}
SAXBuilder xmlbuilder = new SAXBuilder();
try {
xmldocument = xmlbuilder.build(sqlConfigStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.io.IOException;
import java.util.NoSuchElementException;
import java.util.concurrent.Future;

@Deprecated
public class ParallelTableReader extends TableReader {

KeyList keys;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/servicenow/common/soap/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ public PetitTableReader petitReader() throws IOException {
return new PetitTableReader(this);
}

@Deprecated
public ParallelTableReader parallelReader(QueryFilter query)
throws InterruptedException, IOException {
return new ParallelTableReader(this, query);
Expand Down

0 comments on commit bca5545

Please sign in to comment.