X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fbatch%2FBatch.java;h=a588b8080543f3dc966a6e55e90551ebe58bc851;hb=889a9891f6df5bbb26a760cfb106be947e87aa5c;hp=543564d97529bb2904cd8edbefc781cf2d816996;hpb=39596f5b6d2c67d8c2b357243ecfb2dd6d746796;p=aaf%2Fauthz.git diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java index 543564d9..a588b808 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java @@ -90,6 +90,7 @@ public abstract class Batch { public static final String GUI_URL="GUI_URL"; protected final Organization org; + protected String version; protected Batch(AuthzEnv env) throws APIException, IOException, OrganizationException { if (batchEnv != null) { @@ -143,10 +144,12 @@ public abstract class Batch { } } } + + version = env.getProperty(VERSION,Config.AAF_DEFAULT_API_VERSION); } protected abstract void run(AuthzTrans trans); - protected abstract void _close(AuthzTrans trans); + protected void _close(AuthzTrans trans) {} public String[] args() { return env.get(ssargs); @@ -360,7 +363,12 @@ public abstract class Batch { public final void close(AuthzTrans trans) { _close(trans); - cluster.close(); + if(session!=null) { + session.close(); + } + if(cluster!=null) { + cluster.close(); + } } public static void main(String[] args) {