--- projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java 2003/02/05 16:43:48 1.42 +++ projects/cms/source/server/uk/org/iscream/cms/server/rootfilter/RootFilter.java 2003/05/05 22:05:14 1.43 @@ -37,7 +37,7 @@ import uk.org.iscream.cms.server.clientinterface.*; * RootFilter services. * * @author $Author: tdb $ - * @version $Id: RootFilter.java,v 1.42 2003/02/05 16:43:48 tdb Exp $ + * @version $Id: RootFilter.java,v 1.43 2003/05/05 22:05:14 tdb Exp $ */ public class RootFilter implements Component { @@ -46,7 +46,7 @@ public class RootFilter implements Component { /** * The current CVS revision of this class */ - public static final String REVISION = "$Revision: 1.42 $"; + public static final String REVISION = "$Revision: 1.43 $"; //---STATIC METHODS--- @@ -74,33 +74,6 @@ public class RootFilter implements Component { _logger.write(toString(), Logger.WARNING, "RootFilter name not set: "+e); } - // try and get the names of the ciReal and ciDB - String realInterface, dbInterface; - // first realtime - try { - realInterface = cp.getProperty(configName, "RootFilter.realtimeInterfaceName"); - } catch (PropertyNotFoundException e) { - _logger.write(toString(), Logger.DEBUG, "Optional config not set: "+e); - realInterface = null; - } - // next dbi - try { - dbInterface = cp.getProperty(configName, "RootFilter.dbInterfaceName"); - } catch (PropertyNotFoundException e) { - _logger.write(toString(), Logger.DEBUG, "Optional config not set: "+e); - dbInterface = null; - } - - ClientInterface ciReal = null, ciDB = null; - // get reference to the client interfaces - the real time one - if (realInterface != null) { - ciReal = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface\\." + realInterface)); - } - // get reference to the client interfaces - and the db one - if (dbInterface != null) { - ciDB = ClientInterfaceHelper.narrow(_refman.getCORBARef("iscream.ClientInterface\\." + dbInterface)); - } - // setup a queue Queue queue; // see if this Queue needs a size limit @@ -139,30 +112,17 @@ public class RootFilter implements Component { _logger.write(toString(), Logger.WARNING, "failed to find queue monitor config, disabling. " + e); } - if (realInterface != null && dbInterface != null) { - _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + realInterface + " & " + dbInterface); - CIWrapper c = new CIWrapper(ciReal, queue); - c.start(); - c = new CIWrapper(ciDB, queue); - c.start(); - } else if (realInterface == null) { - _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + dbInterface); - CIWrapper c = new CIWrapper(ciDB, queue); - c.start(); - } else if (dbInterface == null) { - _logger.write(toString(), Logger.DEBUG, "hooked to interfaces - " + realInterface); - CIWrapper c = new CIWrapper(ciReal, queue); - c.start(); - } else { - _logger.write(toString(), Logger.WARNING, "not hooked to any client interfaces, this is probably not intentional!"); - } - // RootFilterServant start (for inbound child filter data) _logger.write(toString(), Logger.DEBUG, "starting Root Filter"); RootFilterServant filterServant = new RootFilterServant(queue); // bind to the naming service as a filter _refman.bindToOrb(filterServant, "iscream.Filter\\." + RootFilter.NAME); + // Startup the CORBA Listener + _logger.write(toString(), Logger.DEBUG, "starting servant for inbound clients"); + CorbaClientListenerServant corbaServant = new CorbaClientListenerServant(queue); + _refman.bindToOrb(corbaServant, "iscream.ClientInterface\\." + RootFilter.NAME); + _logger.write(toString(), Logger.SYSINIT, "started"); } @@ -186,32 +146,6 @@ public class RootFilter implements Component { return false; } - // next we need to check which client interfaces *should* - // be active, and check them. Note they do not have to - // be enabled, and we should check this. - // -- each check only forces a dependency if it's configured - ConfigurationProxy cp = ConfigurationProxy.getInstance(); - // first check the client interface - try { - String cli = cp.getProperty("RootFilter", "RootFilter.realtimeInterfaceName"); - obj = _refman.getCORBARef("iscream.ClientInterface\\." + cli); - } catch(ComponentCORBAException e) { - System.err.println(toString() + ": Dependency Failure: "+e); - return false; - } catch(PropertyNotFoundException e) { - System.err.println(toString() + ": Client interface not configured and thus not enabled."); - } - // second check the database interface - try { - String dbi = cp.getProperty("RootFilter", "RootFilter.dbInterfaceName"); - obj = _refman.getCORBARef("iscream.ClientInterface\\." + dbi); - } catch(ComponentCORBAException e) { - System.err.println(toString() + ": Dependency Failure: "+e); - return false; - } catch(PropertyNotFoundException e) { - System.err.println(toString() + ": Database interface not configured and thus not enabled."); - } - // dependency check suceeded return true; } @@ -258,4 +192,4 @@ public class RootFilter implements Component { */ public static String NAME; -} +}