protected void startApisvc(){
  if (!started) {
    started=true;
    Properties sysProps=System.getProperties();
    sysProps.put("buildType","emc");
    sysProps.put("java.library.path","/opt/storageos/lib");
    sysProps.put("entyExpansionLimit","-1");
    sysProps.put("ssun.rmi.transport.connectionTimeout","5000");
    sysProps.put("sun.rmi.transport.tcp.handshakeTimeout","5000");
    sysProps.put("log4j.configuration","apisvc-log4j.properties");
    sysProps.put("product.home","/opt/storageos");
    PropertyConfigurator.configure("apisvc-log4j.properties");
    log.info("Beginning logging");
    Main.main(args);
    try {
      Thread.sleep(10000);
    }
 catch (    InterruptedException ex) {
      log.info("Interrupted");
    }
  }
  applicationContext=AttributeMatcherFramework.getApplicationContext();
  coordinator=(CoordinatorClient)applicationContext.getBean("coordinator");
  dbClient=(DbClient)applicationContext.getBean("dbclient");
}

protected void startApisvc ( ) { if ( ! started ) { started = true ; Properties sysProps = System . getProperties ( ) ; sysProps . put ( "buildType" , "emc" ) ; sysProps . put ( "java.library.path" , "/opt/storageos/lib" ) ; sysProps . put ( "entyExpansionLimit" , "-1" ) ; sysProps . put ( "ssun.rmi.transport.connectionTimeout" , "5000" ) ; sysProps . put ( "sun.rmi.transport.tcp.handshakeTimeout" , "5000" ) ; sysProps . put ( "log4j.configuration" , "apisvc-log4j.properties" ) ; sysProps . put ( "product.home" , "/opt/storageos" ) ; PropertyConfigurator . configure ( "apisvc-log4j.properties" ) ; log . info ( "Beginning logging" ) ; Main . main ( args ) ; try { Thread . sleep ( 10000 ) ; } catch ( InterruptedException ex ) { log . info ( "Interrupted" ) ; } } applicationContext = AttributeMatcherFramework . getApplicationContext ( ) ; coordinator = ( CoordinatorClient ) applicationContext . getBean ( "coordinator" ) ; dbClient = ( DbClient ) applicationContext . getBean ( "dbclient" ) ; }
starts the apisvc . works by simulating a call to com . emc . storageos . volumecontroller . impl . main main ( ) just as if the apisvc script had done so .
