You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2002/12/01 22:51:43 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/flow InterpreterSelector.java
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: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org