On Sun, 12 May 2002 12:11, Stephen McConnell wrote:
> >I also plan to use the converter architecture (in excalibur now,
> > previously of myrmidon) to help with populating the context. Basically
> > converter architecture tries to convert from one type to another type.
>
> Can you give me some liks/references etc. to <resource-ref/> 

I am not sure there is any central place where this is documented (except for 
maybe in the EJB/Servlet/other specs). Theres some data on it at 

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html

But basically it comes down to the following. Each application/bean/whatever 
can declare that it needs other sresources via something like

<resources-ref>
  <description>...</description>
  <res-ref-name>myKey</res-ref-name>
  <res-ref-type>java.lang.Integer</res-ref-type>
  <res-auth>Container</res-auth>
</resources-ref>

Translated into avalon terms this would say that the is an entry in the 
context under key "myKey" that is of type "java.lang.Integer". Avalon has no 
notion of authenticating (thus no need for res-auth) because we have no need.

> and the
> converter stuff

Just look in 

jakarta-avalon-excalibur/converter

Basically it contains a bunch of converters that convert strings into types 
(like Integers, Longs etc). And there is a master converter that you use like

final Converter c = ...get master converter...;
final Integer i = (Integer)c.convert( Integer.class, "53", null );

So basically you convert to a destination type (Integer.class) from a source 
object ("53") in a specific context (null).

> >>Before answering the above, I'll go into a more detail concerning Merlin
> >>configuration semantics.
> >
> >...snip...
>
> There you go again ... snipping the best bits of my emails!
>
> :-)

:)

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to