Retrieving the list of security roles from EJB deployment descriptor

T

tremalnaik

Hello,
I'm trying something maybe impossible: I'd like to read
programmatically the list of security roles I've defined in the file
ejb-jar.xml (I'm delpoying my application in Jboss). So, given the
following entries :

<assembly-descriptor>
<security-role>
<role-name>BITAStarUser</role-name>
</security-role>
<security-role>
<role-name>BITAStarAdminUsers_r</role-name>
</security-role>
......

is it possible to get a list of all those security roles using a
syntax similar to:

javax.naming.Context ctx = new javax.naming.InitialContext();
javax.naming.Context env = ctx.lookup("java:comp/env");

More: I'd like to read the list of roles defined in a method
permission part also:

<method-permission>
<role-name>BITAStarUser</role-name>
<role-name>BITAStarClientHome_r</role-name>
<role-name>BITAStarClientHome_w</role-name>
<role-name>BITAStarClientList_r</role-name>
<role-name>BITAStarClientList_w</role-name>
.....

Is that possible? I think maybe it's not permitted due to security
reasons.

Thanks

TN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top