List<Dn> searchContexts = new ArrayList<Dn>();
Attribute attr = configEntry.get( "classLoaderDefaultSearchContext" );
for ( Value<?> val : attr )
{
Dn dn = directoryService.getDnFactory().create( val.getString() );
searchContexts.add( dn );
}
try
{
classBytes = findClassInDIT( searchContexts, name );
LOG.debug( "Class " + name + " found under default search contexts." );
}
catch ( ClassNotFoundException e )
{
LOG.debug( "Class " + name + " could not be found under default search contexts." );
}
}
if ( classBytes == null )
{
List<Dn> namingContexts = new ArrayList<Dn>();
Set<String> suffixes = directoryService.getPartitionNexus().listSuffixes();
for ( String suffix : suffixes )
{
Dn dn = directoryService.getDnFactory().create( suffix );
namingContexts.add( dn );
}
classBytes = findClassInDIT( namingContexts, name );
}