update Approvals from Testing
[aaf/authz.git] / auth / auth-core / src / main / java / org / onap / aaf / auth / server / AbsServiceStarter.java
index 0e8cb78..11ba656 100644 (file)
@@ -43,9 +43,11 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
     private boolean do_register;
     protected AbsService<ENV,TRANS> service;
        protected String hostname;
+       protected final boolean secure;
 
 
-    public AbsServiceStarter(final AbsService<ENV,TRANS> service) {
+    public AbsServiceStarter(final AbsService<ENV,TRANS> service, boolean secure) {
+       this.secure = secure;
         this.service = service;
         try {
             OrganizationFactory.init(service.env);
@@ -56,7 +58,6 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
         // do_register - this is used for specialty Debug Situations.  Developer can create an Instance for a remote system
         // for Debugging purposes without fear that real clients will start to call your debug instance
         do_register = !"TRUE".equalsIgnoreCase(access().getProperty("aaf_locate_no_register",null));
-        _propertyAdjustment();
         hostname = access().getProperty(Config.HOSTNAME, null);
         if (hostname==null) {
             try {
@@ -65,6 +66,7 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
                                hostname= "cannotBeDetermined";
                        }
         }
+        _propertyAdjustment();
     }
     
     
@@ -96,12 +98,14 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
        });
                if(System.getProperty("ECLIPSE", null)!=null) {
                        Thread.sleep(2000);
-               System.out.println("Service Started in Eclipse: ");
-               System.out.print("  Hit <enter> to end:");
-               try {
-                               System.in.read();
-                               System.exit(0);
-                       } catch (IOException e) {
+                       if(!app.isCancelled()) {
+                       System.out.println("Service Started in Eclipse: ");
+                       System.out.print("  Hit <enter> to end:\n");
+                       try {
+                                       System.in.read();
+                                       System.exit(0);
+                               } catch (IOException e) {
+                               }
                        }
                }
     }
@@ -124,6 +128,7 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
                        _start(service);
                } catch (Exception e) {
                        e.printStackTrace();
+                       shutdown();
                }
        }