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);
// 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 {
hostname= "cannotBeDetermined";
}
}
+ _propertyAdjustment();
}
- public abstract void _start(RServlet<TRANS> rserv) throws Exception;
- public abstract void _propertyAdjustment();
+
+ protected abstract void _start(RServlet<TRANS> rserv) throws Exception;
+ protected abstract void _propertyAdjustment();
public ENV env() {
return service.env;
});
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) {
+ }
}
}
-
}
-
@SafeVarargs
public final synchronized void register(final Registrant<ENV> ... registrants) {
if (do_register) {
_start(service);
} catch (Exception e) {
e.printStackTrace();
+ shutdown();
}
}
}
status = new File(status, fname);
if(status.exists()) {
- status.delete();
+ deleted=status.delete();
}
}
if(deleted) {