{
PlexusSecurityKeyManagementJdoStaxReader reader = new PlexusSecurityKeyManagementJdoStaxReader();
FileReader fileReader = new FileReader( new File( backupDirectory, KEYS_XML_NAME ) );
AuthenticationKeyDatabase database;
try
{
database = reader.read( fileReader );
}
finally
{
IOUtil.close( fileReader );
}
for ( Iterator i = database.getKeys().iterator(); i.hasNext(); )
{
JdoAuthenticationKey key = (JdoAuthenticationKey) i.next();
PlexusJdoUtils.addObject( getPersistenceManager(), key );
}