You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Stefan Pietschmann <St...@inf.tu-dresden.de> on 2003/09/10 12:07:44 UTC

Xindice 1.1b2 + Cocoon 2.1 - continued

hi and thank you again for all your help,

here's a little summary of how far I am. 
(I want to use Xindice with Cocoon 2.1 and was told to use the embedded mode instead of using the webapp...and I don't care as long as it works finally):

1) got xml-xindice from cvs
2) "build"
3) created new folder "xindice" with the following files from cvs/build:
    bin/*; dist/*, java/lib/*, config/*
4) set this folder as %XINDICE_HOME%
5) added %XINDICE_HOME%\bin to the %PATH% variable
6) added this to the cocoon.xconf (at least the parts that were missing)
    <component-instance class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory" name="xmldb">
        <driver class="org.apache.xindice.client.xmldb.DatabaseImpl" type="xindice"/>

        <driver class="org.apache.xindice.client.xmldb.embed.DatabaseImpl" type="xindice"/>
    </component-instance>
7) put the following files from the cvs/build into the cocoon/WEB-INF/lib folder (overwriting older versions): xml*.jar, xindice-1.1b2,jar


Q1: so... well... since the XML:DB generator is to be deprecated and i couldn't even find a XML:DB Transformer, so what else do I have to do in order to use the xml:db pseudo-protocol as suggested? 
i could hardly find any information about how to use it as well (like adding/deleting files from the db - or is it just for requests?)

Q2: where will the db be situated with this config?

Q3:how can I start xindice automatically everytime i start tomcat?


again - sorry, I'm pretty new to this, so please try to be patient. i'm a nice guy :D

thanx again
stefan



Re: Xindice 1.1b2 + Cocoon 2.1 - continued

Posted by Stefan Pietschmann <St...@inf.tu-dresden.de>.
well, the point was, that I don't need it as a webapp (I was told). that's why I did (6) - which actually added the *.embed.DatabaseImpl"* line.
  ----- Original Message ----- 
  From: Barzilai Spinak 
  To: xindice-users@xml.apache.org 
  Sent: Wednesday, September 10, 2003 10:42 PM
  Subject: Re: Xindice 1.1b2 + Cocoon 2.1 - continued


  Stefan Pietschmann wrote:

    hi and thank you again for all your help,

    here's a little summary of how far I am. 
    (I want to use Xindice with Cocoon 2.1 and was told to use the embedded mode instead of using the webapp...and I don't care as long as it works finally):

    1) got xml-xindice from cvs
    2) "build"
    3) created new folder "xindice" with the following files from cvs/build:
        bin/*; dist/*, java/lib/*, config/*
    4) set this folder as %XINDICE_HOME%
    5) added %XINDICE_HOME%\bin to the %PATH% variable
    6) added this to the cocoon.xconf (at least the parts that were missing) 
        <component-instance class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory" name="xmldb">
            <driver class="org.apache.xindice.client.xmldb.DatabaseImpl" type="xindice"/>

            <driver class="org.apache.xindice.client.xmldb.embed.DatabaseImpl" type="xindice"/>
        </component-instance>

  I didn´t need to do step (6) with Cocoon 2.1..  It as already done.


    7) put the following files from the cvs/build into the cocoon/WEB-INF/lib folder (overwriting older versions): xml*.jar, xindice-1.1b2,jar

  Be careful to remove other jars that have not quite the same name but contain the same packages. (For example, in 2.1
  there's a file called xmldb-api-20011111.jar  which should be replaced by xmldb-api-20021118.jar which comes with Xindice. I think)


    Q1: so... well... since the XML:DB generator is to be deprecated and i couldn't even find a XML:DB Transformer, so what else do I have to do in order to use the xml:db pseudo-protocol as suggested? 
    i could hardly find any information about how to use it as well (like adding/deleting files from the db - or is it just for requests?)
  Something like this:
        <map:generate type="file" src="xmldb:xindice://localhost:8080/db/etc/etc/etc"/>

  And yes, it's only for requests.  Also, the port 8080 is the standar in Tomcat but as I said in a previous message, it may be
  8888 if it's running from the provided Jetty.  They have to agree on the port. It seems that every Xindice release or beta
  runs on a different port!


    Q2: where will the db be situated with this config?
  You can put it wherever you want. But it has to be pointed to by system.xml in the webapp and system.xml in the command line version, if you want
  both to use the same database.  

    Q3:how can I start xindice automatically everytime i start tomcat?
  If it's deployed as a webapp, it will start with the rest of the webapps/servlets



  BarZ

Re: Xindice 1.1b2 + Cocoon 2.1 - continued

Posted by Barzilai Spinak <ba...@internet.com.uy>.
Stefan Pietschmann wrote:

> hi and thank you again for all your help,
>  
> here's a little summary of how far I am. 
> (I want to use Xindice with Cocoon 2.1 and was told to use 
> the embedded mode instead of using the webapp...and I don't care as 
> long as it works finally):
>  
> 1) got xml-xindice from cvs
> 2) "build"
> 3) created new folder "xindice" with the following files from cvs/build:
>     bin/*; dist/*, java/lib/*, config/*
> 4) set this folder as %XINDICE_HOME%
> 5) added %XINDICE_HOME%\bin to the %PATH% variable
> 6) added this to the *cocoon.xconf* (at least the parts that were 
> missing)
>     <component-instance 
> class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory" 
> name="xmldb">
>         <driver class="org.apache.xindice.client.xmldb.DatabaseImpl" 
> type="xindice"/>
>         <driver 
> class="org.apache.xindice.client.xmldb.embed.DatabaseImpl" 
> type="xindice"/>
>     </component-instance>


I didn´t need to do step (6) with Cocoon 2.1..  It as already done.

> 7) put the following files from the cvs/build into 
> the cocoon/WEB-INF/lib folder (overwriting older versions): xml*.jar, 
> xindice-1.1b2,jar
>  

Be careful to remove other jars that have not quite the same name but 
contain the same packages. (For example, in 2.1
there's a file called xmldb-api-20011111.jar  which should be replaced 
by xmldb-api-20021118.jar which comes with Xindice. I think)

>  
> Q1: so... well... since the XML:DB generator is to be deprecated and i 
> couldn't even find a XML:DB Transformer, so what else do I have to do 
> in order to use the xml:db pseudo-protocol as suggested?
> i could hardly find any information about how to use it as well (like 
> adding/deleting files from the db - or is it just for requests?)

Something like this:
      <map:generate type="file" 
src="xmldb:xindice://localhost:8080/db/etc/etc/etc"/>

And yes, it's only for requests.  Also, the port 8080 is the standar in 
Tomcat but as I said in a previous message, it may be
8888 if it's running from the provided Jetty.  They have to agree on the 
port. It seems that every Xindice release or beta
runs on a different port!

> Q2: where will the db be situated with this config?

You can put it wherever you want. But it has to be pointed to by 
system.xml in the webapp and system.xml in the command line version, if 
you want
both to use the same database.  

> Q3:how can I start xindice automatically everytime i start tomcat?

If it's deployed as a webapp, it will start with the rest of the 
webapps/servlets



BarZ