while (i < dbs.length) {
String instance = dbs[i];
// create servant and register it with the ORB
Database db = Database.getDatabase(instance);
DatabaseServant dbRef = new DatabaseServant(db, kernel);
rootPOA.activate_object(dbRef);
rootPOA.the_POAManager().activate();
String iorFile = null;
try {
iorFile = System.getProperty(Xindice.PROP_XINDICE_HOME) +
"/docs/" + db.getName() + "_bootstrap.ior";
PrintWriter out = new PrintWriter(new FileOutputStream( iorFile ),
true);
out.println( orb.object_to_string( dbRef._this(orb) ) );
out.close();
}
catch ( Exception e ) {
org.apache.xindice.Debug.println("Unable to bootstrap the instance '" +
db.getName() + "' due to an error writing: " + iorFile);
}
if ( useNaming ) {
// bind the Object Reference in Naming
NameComponent nc = new NameComponent(db.getName(), "");
NameComponent path[] = {root, nc};
ncRef.bind(path, dbRef._this(orb));
System.out.println(getName() + ": '" + instance +