File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes JAAS and EJB ?? Need help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "JAAS and EJB ?? Need help" Watch "JAAS and EJB ?? Need help" New topic
Author

JAAS and EJB ?? Need help

Jay Sam
Greenhorn

Joined: Feb 27, 2005
Posts: 27
Hi,

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,

Jay
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
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.

Lin
[ April 09, 2005: Message edited by: LIN FENG ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAAS and EJB ?? Need help
 
Similar Threads
server and client side patterns
ServiceLocator with JAAS authentication ?
ServiceLocator with JAAS ?
Caching ejb 3 bean lookups
classpath woes