Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1182

[PATCH] Writing an XMLDBSource through the SourceWritingTransformer does not use user and password.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8
    • None
    • Blocks: XML-DB
    • None
    • Operating System: other
      Platform: Other
    • 29524

    Description

      Hi,

      I was trying to write an document to an eXist database using the
      WritingSourceTransformer when I figure out that the user and password
      defined in cocoon.xconf at:

      <component-instance
      class="org.apache.cocoon.components.source.impl.XMLDBSourceFactory"
      name="xmldb">
      <driver class="org.exist.xmldb.DatabaseImpl" type="exist" user="user"
      password="password"/>
      </component-instance>

      were not used.

      the XML used to store the document is like :

      <source:write create="true">
      <source:source>xmldb:exist://localhost:8080/exist/xmlrpc/db/test.xml&lt;/source:source>
      <source:fragment>
      <mydoc>pim pam pom</mydoc>
      </source:fragment>
      </source:write>

      The XMLDBSourceFactory get user and password from cocoon.xconf and use them to
      create an XMLDBSource but two methods of this class doesn't handle credentials
      when accessing database : writeOutputStream() and delete().
      the call to :
      DatabaseManager.getCollection(base);
      is used instead of :
      DatabaseManager.getCollection(base, user, password) ;

      Attachments

        Activity

          People

            Unassigned Unassigned
            gguillemot@rennes.jouve.fr Gildas Guillemot
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: