On Tue, 19 Nov 2002, at 19:36 [+0100], Stephen McConnell ([EMAIL PROTECTED]:
> > > Gary Shea wrote: > > >Just a heads up while I try to track this one down... I've got a class > >which is Contextualizable, looks for the key "options-document-name". > >The associatied xinfo has the corresponding <entry/> element. In the > >kernel.xml profile, a non-empty value is specified in yet another <entry/> > >element. > > > > The the .xinfo file you are declaring a criteria: > > <entry key="message"/> > <entry key="whatever" type="java.io.File"/> > > This is saying to the container that this component *must* be supplied > with to context entried, one entry shall have a key of "message"and a > type of String (the default type if not specificed), and the other entry > shall be a File instance supplied under the key "whatever". > > The defintions in the kernal.xml (or packaged profiles) and entry > directives. These statements are declarations to the container on how > to go about creating a context entry. Two possibilities exist (a) > importing an value from the container such as "avalon:home", or > programatically constructing something. For example, the following > entried in a <compoent> defintion declare context directives (refer > ContextDirective in excalibur/meta/model javadoc). > > <compoent type="MyComponet"> > <context> > <entry key="message">I'm busy applying your patch</entry> > <import name="avalon:home" key="whatever"/> > </context> > </component> > > The above information tells the container to assign the string "I'm busy > applying your patch" as the value of the context entry for "message", > and to import the containers defintion of "avalon:home" and assign it > under the components key of "whatever". Ah-ha! I should have waited. After a small struggle the code yielded the truth which is that contrary to the doc, the context value is set as you show above, not as 'value="..."'. Of course I figured that out about 30 seconds before your mail ;). Attached find a few meta patches, one of which I believe fixes that doc error. Thanks for the detailed response though! Gary > > >When the class is contextualized, an "options-document-name" > >value is provided, but it is the empty string. > > > > > > Is there is context directive in the kernel.xml file? > > >If this reminds you of something let me know please. > > > >Oh, the pooling stuff still isn't quite working but this problem is > >earlier in the output ;) > > > > > > Getting to that - apply you patch at the moment. > > Cheers, Steve. > > :-)
? src/java/org/apache/excalibur/meta/info/.nbattrs ? src/java/org/apache/excalibur/meta/info/builder/.nbattrs Index: src/java/org/apache/excalibur/meta/info/builder/TypeBuilder.java =================================================================== RCS file: /home/cvspublic/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/TypeBuilder.java,v retrieving revision 1.6 diff -u -r1.6 TypeBuilder.java --- src/java/org/apache/excalibur/meta/info/builder/TypeBuilder.java 23 Oct 2002 16:34:47 -0000 1.6 +++ src/java/org/apache/excalibur/meta/info/builder/TypeBuilder.java 19 Nov 2002 +18:42:08 -0000 @@ -176,6 +176,12 @@ final String xinfo = classname.replace( '.', '/' ) + ".xinfo"; + if ( getLogger().isDebugEnabled() ) + { + getLogger().debug( + "build Type from XML descriptor: " + xinfo + + " resource found: " + (classLoader.getResource( xinfo ) != null) ); + } final InputStream inputStream = classLoader.getResourceAsStream( xinfo ); Index: src/java/org/apache/excalibur/meta/info/builder/XMLTypeCreator.java =================================================================== RCS file: /home/cvspublic/jakarta-avalon-excalibur/meta/src/java/org/apache/excalibur/meta/info/builder/XMLTypeCreator.java,v retrieving revision 1.14 diff -u -r1.14 XMLTypeCreator.java --- src/java/org/apache/excalibur/meta/info/builder/XMLTypeCreator.java 18 Nov 2002 11:23:46 -0000 1.14 +++ src/java/org/apache/excalibur/meta/info/builder/XMLTypeCreator.java 19 Nov 2002 +18:42:09 -0000 @@ -106,6 +106,11 @@ InputStream inputStream ) throws Exception { + if( getLogger().isDebugEnabled() ) + { + getLogger().debug( "Reading Type XML for " + implementationKey ); + } + if( inputStream == null ) { throw new NullPointerException( "input" ); Index: src/xdocs/profile.xml =================================================================== RCS file: /home/cvspublic/jakarta-avalon-excalibur/meta/src/xdocs/profile.xml,v retrieving revision 1.1 diff -u -r1.1 profile.xml --- src/xdocs/profile.xml 11 Nov 2002 11:58:47 -0000 1.1 +++ src/xdocs/profile.xml 19 Nov 2002 18:42:09 -0000 @@ -63,7 +63,7 @@ --></i></font> <context> - <entry name="<font color="darkred">location</font>" value="<font color="darkred">Paris</font>"/> + <entry name="<font color="darkred">location</font>"><font +color="darkred">Paris</font></entry> </context> <font color="gray"><i><!--
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>