Environment: JBoss 3.2.3
I have a Stateless Session Bean and within one of the business methods, I have code
that looks something like this:
| /**
| * @ejb.interface-method
| * @ejb.permission role-name = "Manager, Director"
| */
| 1 public void doSomething() {
| 2 Principal loggedUser = sessionContext.getCallerPrincipal();
| 3
| 4 System.out.println("Logged in user is: " + loggedUser.getName());
| 5 System.out.println("role [Manager]: " +
String.valueOf(sessionContext.isCallerInRole("Manager")));
| 6 System.out.println("role [CEO]: " +
String.valueOf(sessionContext.isCallerInRole("CEO")));
|
| /* etc.... */
| }
|
A client will log in via JAAS and call doSomething. Line 4 correctly prints out the
username of the user. Note that the user superman has been assigned the role Manager.
Line 5 and 6 causes these outputs to the console:
anonymous wrote :
| INFO [STDOUT] Logged in user is: superman
| WARN [org.jboss.ejb.EnterpriseContext] no match found for security role Manager
in the deployment descriptor.
| INFO [STDOUT] role [Manager]: true
| WARN [org.jboss.ejb.EnterpriseContext] no match found for security role CEO in
the deployment descriptor.
| INFO [STDOUT] role [CEO]: false
|
Since I did declare the Manager roles in the assembly-descriptor portion of
ejb-jar.xml, why am I getting the Warning on the Manager role. I'd expected to get it
for the CEO role which doesn't exist in the ejb-jar.xml. How can I remove these
warning messages ?
Merci beaucoup.
Ronaldo
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3833847#3833847
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3833847
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user