changed PrincipalPersistenceListener code sample