i want to set the role in my logic
but how?
i have a login procedure with db access and final, i know which role the user will get...
so i only want to set his role "customer" in ejb - exist there one command?
i look for it but nothing worked
i tried ctx.isCallerInRole("guest");
but get No valid security context for the caller identity
in web.xml i added
<security-constraint>
<web-resource-collection>
<web-resource-name>Test</web-resource-name>
<url-pattern>/Test/</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Guest</role-name>
<role-name>Customer</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-role>
Authorized to limited access.
<role-name>Guest</role-name>
</security-role>
<security-role>
Authorized to access everything.
<role-name>Customer</role-name>
</security-role>
Moved to user forum as this is not a design question.