code: @Override
     protected void storeRecovery(Recovery r, XMLStreamWriter writer) throws Exception
     {
        writer.writeStartElement(XML.ELEMENT_RECOVERY);
  
        if (r.isNoRecovery() != null)
           writer.writeAttribute(XML.ATTRIBUTE_NO_RECOVERY,
                                 r.getValue(XML.ATTRIBUTE_NO_RECOVERY, r.isNoRecovery().toString()));
  
        if (r.getCredential() != null)
        {
           writer.writeStartElement(XML.ELEMENT_RECOVERY_CREDENTIAL);
  
           Credential c = (Credential)r.getCredential();
           if (c.getUserName() != null)
           {
              writer.writeStartElement(XML.ELEMENT_USER_NAME);
              writer.writeCharacters(c.getValue(XML.ELEMENT_USER_NAME,
                                                c.getUserName()));
              writer.writeEndElement();
  
              writer.writeStartElement(XML.ELEMENT_PASSWORD);
              writer.writeCharacters(c.getValue(XML.ELEMENT_PASSWORD,
                                                c.getPassword()));
              writer.writeEndElement();
           }
           else
           {
              writer.writeStartElement(XML.ELEMENT_SECURITY_DOMAIN);
              writer.writeCharacters(c.getValue(XML.ELEMENT_SECURITY_DOMAIN,
                                                c.getSecurityDomain()));
              writer.writeEndElement();
           }
           writer.writeEndElement();
        }
  
        if (r.getPlugin() != null)
        {
           storeExtension(r.getPlugin(), writer, CommonXML.ELEMENT_RECOVERY_PLUGIN);
        }
  
        writer.writeEndElement();
     }
docs: Store recovery
  @param r The recovery
  @param writer The writer
  @exception Exception Thrown if an error occurs