}
public void backupUserDatabase( File backupDirectory )
throws IOException, XMLStreamException
{
UserDatabase database = new UserDatabase();
database.setUsers( PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager(), JdoUser.class ) );
UserManagementStaxWriter writer = new UserManagementStaxWriter();
FileWriter fileWriter = new FileWriter( new File( backupDirectory, USERS_XML_NAME ) );
try
{