You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephen Ng <st...@verizon.net> on 2002/05/09 20:12:34 UTC

Dynamic sql in xsp

I need some advice.

I have an xsp which is using esql.  The query in the esql is dynamically
generated (based upon the request string).  I use cinclude to inject the
dynamic sql into the esql element.  Something like this:

<esql:execute-query>
  <esql:query>
    <cinclude:include src="cocoon://sql/generateSomeSql.sql"/>
  </esql:query>

So, I have an xsp that is dynamic.

This work just peachy.

Problem is, it's slow--the java compiler has to rebuild the xsp every
time the sql changes, which is costing me 1/2 a second (and is pretty
pointless, it's only the string that is changing).

How can I get the xsp to load the string in some other way, so I that I
can use a static xsp, and not have the compilation overhead?

Thanks,

Steve


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


RE: Dynamic sql in xsp

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Stephen Ng [mailto:stephen.ng@verizon.net]
> 
> I need some advice.
> 
> I have an xsp which is using esql.  The query in the esql is
dynamically
> generated (based upon the request string).  I use cinclude to inject
the
> dynamic sql into the esql element.  Something like this:
> 
> <esql:execute-query>
>   <esql:query>
>     <cinclude:include src="cocoon://sql/generateSomeSql.sql"/>
>   </esql:query>
> 
> So, I have an xsp that is dynamic.
> 
> This work just peachy.
> 
> Problem is, it's slow--the java compiler has to rebuild the xsp every

Of course it's slow :)


> time the sql changes, which is costing me 1/2 a second (and is pretty
> pointless, it's only the string that is changing).
>
> How can I get the xsp to load the string in some other way, so I that
I
> can use a static xsp, and not have the compilation overhead?

Why not generate SQL string *in* this XSP? That's would give the best
performance.

Or, other way is to obtain this SQL string into String programmatically,
without using include.


Vadim


> Thanks,
> 
> Steve



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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