Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

run-as question.

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

my question..

If i use <run-as> with the role-name User for exmaple in Bean A and i make

a getCallerPrincipal on a method of Bean B (B is called from A) i see the

Principal associated with the run as, but if i have more principals

associated to the User role-name what is the result?


I hope to be clear

Thanks!!

Gabriele
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Spec 21.6.4:

The EJB Container must be capable of allowing the Deployer to specify that a run-as principal be used
for the execution of the home and component methods of a session or entity bean or for the onMessage
method of a message-driven bean.




I would say that this run-as principal is used, and not a principal that corresponds to the role. Did you try it out?

Severin
 
Severin Stoeckli
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... yes, the confirmation is in


21.4.3

If the Application Assembler specifies that a run-as identity be used on behalf of a particular enterprise
bean, the Deployer must configure the enterprise beans such that the run-as principal is used as the
caller principal on any calls that the enterprise bean makes to other beans, and that the run-as principal
is propagated along the call-chain of those other beans (in the absence of the specification of any further
run-as elements).



/Severin
 
This tiny ad is guaranteed to be gluten free.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic