//Generate the SecurityRoleRef set
Iterator<SecurityRoleRefMetaData> it = container.getBeanMetaData().getSecurityRoleReferences();
Set<SecurityRoleRef> securityRoleRefs = new HashSet<SecurityRoleRef>();
while(it.hasNext())
{
SecurityRoleRefMetaData meta = (SecurityRoleRefMetaData) it.next();
securityRoleRefs.add(new SecurityRoleRef(meta.getName(), meta.getLink(),meta.getDescription()));
}
//Get the context subject
Subject contextSubject = null;
try
{