code: protected void storeAdminObject(AdminObject ao, XMLStreamWriter writer) throws Exception
     {
        writer.writeStartElement(CommonXML.ELEMENT_ADMIN_OBJECT);
  
        if (ao.getClassName() != null)
           writer.writeAttribute(CommonXML.ATTRIBUTE_CLASS_NAME,
                                 ao.getValue(CommonXML.ATTRIBUTE_CLASS_NAME, ao.getClassName()));
  
        if (ao.getJndiName() != null)
           writer.writeAttribute(CommonXML.ATTRIBUTE_JNDI_NAME,
                                 ao.getValue(CommonXML.ATTRIBUTE_JNDI_NAME, ao.getJndiName()));
  
        if (ao.isEnabled() != null && (ao.hasExpression(CommonXML.ATTRIBUTE_ENABLED) ||
                                       !Defaults.ENABLED.equals(ao.isEnabled())))
           writer.writeAttribute(CommonXML.ATTRIBUTE_ENABLED,
                 ao.getValue(CommonXML.ATTRIBUTE_ENABLED, ao.isEnabled().toString()));
  
        if (ao.getId() != null)
           writer.writeAttribute(CommonXML.ATTRIBUTE_ID, ao.getValue(CommonXML.ATTRIBUTE_ID, ao.getId()));
  
        if (ao.getConfigProperties() != null && !ao.getConfigProperties().isEmpty())
        {
           Iterator<Map.Entry<String, String>> it = ao.getConfigProperties().entrySet().iterator();
           while (it.hasNext())
           {
              Map.Entry<String, String> entry = it.next();
  
              writer.writeStartElement(CommonXML.ELEMENT_CONFIG_PROPERTY);
              writer.writeAttribute(CommonXML.ATTRIBUTE_NAME, entry.getKey());
              writer.writeCharacters(ao.getValue(CommonXML.ELEMENT_CONFIG_PROPERTY, entry.getKey(), entry.getValue()));
              writer.writeEndElement();
           }
        }
  
        writer.writeEndElement();
     }
docs: Store admin object
  @param ao The admin object
  @param writer The writer
  @exception Exception Thrown if an error occurs