{
LoginContext login = ApplicationCallbackHandler.login("audituser1", "user1");
try
{
AuditMappedHome home = getAuditMappedEJB();
AuditMapped audit = home.create(id);
audit.setCreatedBy(user);
audit.setCreatedTime(new Date(time));
}
finally
{
if (login != null)
login.logout();