I am trying to get the name of the principal from EJBContext object.
I have asimple doubt as to who sets the principal?
Is it the ServletContainer that sets the principal? or the EJB container?
Please suggest, as I am getting name of the principal as "anonymous" only.
Both set it. Have you read the JAAS Howto at the start of this forum?