*/
protected void startUpAppPartitions( String eveWkdir ) throws NamingException
{
OidRegistry oidRegistry = globalRegistries.getOidRegistry();
AttributeTypeRegistry attributeTypeRegistry;
attributeTypeRegistry = globalRegistries.getAttributeTypeRegistry();
MatchingRuleRegistry reg = globalRegistries.getMatchingRuleRegistry();
// start getting all the parameters from the initial environment
ContextPartitionConfig[] configs = null;
configs = PartitionConfigBuilder.getContextPartitionConfigs( initialEnv );
for ( int ii = 0; ii < configs.length; ii++ )
{
// ----------------------------------------------------------------
// create working directory under eve directory for app partition
// ----------------------------------------------------------------
String wkdir = eveWkdir + File.separator + configs[ii].getId();
mkdirs( eveWkdir, configs[ii].getId() );
// ----------------------------------------------------------------
// create the database/store
// ----------------------------------------------------------------
Name upSuffix = new LdapName( configs[ii].getSuffix() );
Normalizer dnNorm = reg.lookup( "distinguishedNameMatch" ) .getNormalizer();
Name normSuffix = new LdapName( ( String ) dnNorm.normalize( configs[ii].getSuffix() ) );
Database db = new JdbmDatabase( upSuffix, normSuffix, wkdir );
// ----------------------------------------------------------------
// create the search engine using db, enumerators and evaluators
// ----------------------------------------------------------------
ExpressionEvaluator evaluator;
evaluator = new ExpressionEvaluator( db, oidRegistry, attributeTypeRegistry );
ExpressionEnumerator enumerator;
enumerator = new ExpressionEnumerator( db, attributeTypeRegistry, evaluator );
SearchEngine eng = new DefaultSearchEngine( db, evaluator, enumerator );
// ----------------------------------------------------------------
// fill up a list with the AttributeTypes for the system indices
// ----------------------------------------------------------------
ArrayList attributeTypeList = new ArrayList();
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.ALIAS_OID ) );
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.EXISTANCE_OID ) );
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.HIERARCHY_OID ) );
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.NDN_OID ) );
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.ONEALIAS_OID ) );
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.SUBALIAS_OID ) );
attributeTypeList.add( attributeTypeRegistry.lookup( SystemPartition.UPDN_OID ) );
// ----------------------------------------------------------------
// if user indices are specified add those attribute types as well
// ----------------------------------------------------------------
for ( int jj = 0; jj < configs[ii].getIndices().length; jj++ )
{
attributeTypeList.add( attributeTypeRegistry
.lookup( configs[ii].getIndices()[jj] ) );
}
// ----------------------------------------------------------------
// fire up the appPartition & register it with the nexus