• 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JAAS and EJB ?? Need help

Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this question is directed to those who are familiar with the subject.doAs(subject, action) way of calling business methods on EJBs.

How can I pass parameters with this construct ?!? What if my client has to call a method on the EJB, encapsulated with the ACTION class, which requires parameters ?!

Also: how does this way of calling business methods on beans fit with the service locator pattern ? After all, service locator will at least create the bean and pass the reference. All later calls on the stateful session bean from the client will have to hand this reference to the Action helper classes...

Somehow I think there is another construct which is useful for this.

Are there any other incompatibilities between ServiceLocator and this way of calling the EJBs ?

Thanks for any help,

Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An inner class which implements the PrivilegedAction should help.
An inner class can access an outter class instance memeber , so you can hold the EJB reference in the member variable of outter class. Use service locator to initialize that member variable. The Action can get the reference again and again.

[ April 09, 2005: Message edited by: LIN FENG ]
This tiny ad is guaranteed to be gluten free.
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic