crafterm    2002/12/01 13:51:43

  Modified:    src/java/org/apache/cocoon/components/flow
                        InterpreterSelector.java
  Log:
  Fixed unreleased 'select' of interpreter hints during InterpreterSelector
  configuration.
  
  Also fixes the creation of one interpreter instance per language during
  startup that aren't associated with any particular request thread.
  
  Revision  Changes    Path
  1.5       +5 -8      
xml-cocoon2/src/java/org/apache/cocoon/components/flow/InterpreterSelector.java
  
  Index: InterpreterSelector.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/flow/InterpreterSelector.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InterpreterSelector.java  1 Oct 2002 07:34:16 -0000       1.4
  +++ InterpreterSelector.java  1 Dec 2002 21:51:43 -0000       1.5
  @@ -55,7 +55,7 @@
   public class InterpreterSelector extends ExcaliburComponentSelector
     implements Configurable, ThreadSafe
   {
  -  String defaultLanguage;
  +  private String defaultLanguage;
   
     public void configure(Configuration config)
       throws ConfigurationException
  @@ -72,14 +72,11 @@
       for (int i = 0; i < configurations.length; i++) {
         Configuration conf = configurations[i];
         String hint = conf.getAttribute("name").trim();
  -      Interpreter interp;
   
  -      try {
  -        interp = (Interpreter)this.select(hint);
  -      }
  -      catch (ComponentException ex) {
  -        throw new ConfigurationException("Could not find component for hint "
  -                                         + hint + ": " + ex.toString());
  +      if (!this.getComponentHandlers().containsKey(hint)) {
  +        throw new ConfigurationException(
  +          "Could not find component for hint: " + hint
  +        );
         }
   
         if (i == 0 && defaultLanguage == null)
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to