You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Jeremias Maerki <je...@outline.ch> on 2002/01/07 09:56:12 UTC

XPathProcessor and implementations

Hi there

I wanted to use org.apache.avalon.excalibur.xml.xpath.XPathProcessor but
I've realized that it's a bit difficult since the two implementations
don't implement the Component interface. I've had a look into Cocoon2
CVS where XPathProcessorImpl does implement Component. Would some be so
kind as to do that little modification in Excalibur?

By the way: The way the two implementations (Xalan and Jaxen) are done,
it should be safe to implement "ThreadSafe" as well. That way, they
won't get recreated with each use. Am I right?

Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: XPathProcessor and implementations

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Jeremias Maerki  wrote
> 
> > > By the way: The way the two implementations (Xalan and Jaxen) 
> are done,
> > > it should be safe to implement "ThreadSafe" as well. That way, they
> > > won't get recreated with each use. Am I right?
> 
> Well, I'm still hoping for an answer on this one. Especially, because I
> have similar decisions with my code.
> 
I looked at the code and it seems that you're right. There is no reason
against making them thread safe. I just fixed that. Thanks!

Carsten

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: XPathProcessor and implementations

Posted by Jeremias Maerki <je...@outline.ch>.
On Mon, 7 Jan 2002 15:05:24 +0100 Carsten Ziegeler wrote:
> Jeremias Maerki wrote:
> >
> > Hi there
> >
> > I wanted to use org.apache.avalon.excalibur.xml.xpath.XPathProcessor but
> > I've realized that it's a bit difficult since the two implementations
> > don't implement the Component interface. I've had a look into Cocoon2
> > CVS where XPathProcessorImpl does implement Component. Would some be so
> > kind as to do that little modification in Excalibur?
> >
> 
> To be honest, the implementation in Avalon is correct! The XPathProcessor,
> the interface not the implementation, extends the Component interface, so
> there
> is no need for the implementations to implement them as well. In fact this
> is the way, the Avalon team suggest to design the interface.
> So it should be possible to use those components.
> 
> Cocoon unfortunately does not follow the above guidline - not yet, but it
> will shorty....

Oh, I stand corrected. Got to read the latest version of "Developing
with Avalon"... :-) Thanks, Carsten!

> Carsten
> > By the way: The way the two implementations (Xalan and Jaxen) are done,
> > it should be safe to implement "ThreadSafe" as well. That way, they
> > won't get recreated with each use. Am I right?

Well, I'm still hoping for an answer on this one. Especially, because I
have similar decisions with my code.

Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: XPathProcessor and implementations

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Jeremias Maerki wrote:
>
> Hi there
>
> I wanted to use org.apache.avalon.excalibur.xml.xpath.XPathProcessor but
> I've realized that it's a bit difficult since the two implementations
> don't implement the Component interface. I've had a look into Cocoon2
> CVS where XPathProcessorImpl does implement Component. Would some be so
> kind as to do that little modification in Excalibur?
>

To be honest, the implementation in Avalon is correct! The XPathProcessor,
the interface not the implementation, extends the Component interface, so
there
is no need for the implementations to implement them as well. In fact this
is the way, the Avalon team suggest to design the interface.
So it should be possible to use those components.

Cocoon unfortunately does not follow the above guidline - not yet, but it
will shorty....

Carsten
> By the way: The way the two implementations (Xalan and Jaxen) are done,
> it should be safe to implement "ThreadSafe" as well. That way, they
> won't get recreated with each use. Am I right?
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>