how to pass user credentials to ejb module

haiiam using custom security in my project.in web module i have to call CMP through session bean...how to pass user id and role to ejb module to check wether user is in role or not.without passing as parameters is there any method to pass user credentials to EJB Module.
[284 byte] By [RAGHURAJREDDYa] at [2007-10-2 17:12:10]
# 1
Hi what kind of security system is being used? Are any security realms configured? Are u using one of LDAP, ADS, or Application Server's user/groups or verification with DataBase?Thanks,marvlex
marvlexa at 2007-7-13 18:27:23 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

iam using Database realm ,with JAAS.

everything working in web module, means

request.getRemoteUser();

request.isCallerInRole();

when i want call ejb,in ejb also we have methods like

ctx.isUserInRole()

how this function work.how to pass login credentials to ejb so that it will

check user role form database without passing Parameters from WEB Module

Thank you

RAGHURAJREDDYa at 2007-7-13 18:27:23 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...