private synchronized void init(String instanceRDN) throws Exception {
  String srvcName=getServiceName();
  if (adminToken == null) {
    adminToken=(SSOToken)AccessController.doPrivileged(AdminTokenAction.getInstance());
    sManager=new ServiceManager(adminToken);
    ServiceSchemaManager schemaManager=sManager.getSchemaManager(srvcName,SERVICE_VERSION);
    clientServiceSchema=schemaManager.getGlobalSchema();
    clientSchema=clientServiceSchema.getSubSchema(DBSTORE_SUBSCHEMA_ID);
    clientSchema=clientSchema.getSubSchema(CLIENT_SUBSCHEMA_ID);
    amConnection=new AMStoreConnection(adminToken);
    topLevelDN=amConnection.getOrganizationDN(null,null);
    initClientSchema();
    initConfigurationInfo(clientServiceSchema);
    clientDataDN=CLIENT_DATA_DN_PREFIX + COMMA + topLevelDN;
  }
  databaseDN=instanceRDN + COMMA + clientDataDN;
  amClientOrg=amConnection.getOrganizationalUnit(databaseDN);
}

private synchronized void init ( String instanceRDN ) throws Exception { String srvcName = getServiceName ( ) ; if ( adminToken == null ) { adminToken = ( SSOToken ) AccessController . doPrivileged ( AdminTokenAction . getInstance ( ) ) ; sManager = new ServiceManager ( adminToken ) ; ServiceSchemaManager schemaManager = sManager . getSchemaManager ( srvcName , SERVICE_VERSION ) ; clientServiceSchema = schemaManager . getGlobalSchema ( ) ; clientSchema = clientServiceSchema . getSubSchema ( DBSTORE_SUBSCHEMA_ID ) ; clientSchema = clientSchema . getSubSchema ( CLIENT_SUBSCHEMA_ID ) ; amConnection = new AMStoreConnection ( adminToken ) ; topLevelDN = amConnection . getOrganizationDN ( null , null ) ; initClientSchema ( ) ; initConfigurationInfo ( clientServiceSchema ) ; clientDataDN = CLIENT_DATA_DN_PREFIX + COMMA + topLevelDN ; } databaseDN = instanceRDN + COMMA + clientDataDN ; amClientOrg = amConnection . getOrganizationalUnit ( databaseDN ) ; }
1 . get the admin token ( or create one ) 2 . create a servicemanager 3 . get the serviceschemamanager for the service 4 . get the serviceschema for the global schema 5 . get the schema for the " internaldata " schema . ( temp var ) . 6 . get the schema for the " clientdata " schema id . ( overwrite 8 ) . 7 . get the root_suffix 8 . read config info & properties schema from serviceschema 9 . add listeners to eventservice .
