ok I'll try to explain more on this. Typically the client accessing and
using this factory will look like

public class Client{
    Client() {
        try{
            EJBHomeFactory fact = EJBHomeFactory.getFactory();
            HelloWorldHome home =
(HelloWorldHome)fact.getHomeInterface(HelloWorldHome.class,
"rahul.HelloWorldBean");
            HelloWorldEJBObject hello = home.create();
            System.out.println("Client says:"+hello.printMessage());
        }catch(Exception e){
            e.printStackTrace();
        }
    }

    public static void main(String a[]){
        new Client();
    }
}

Here how/where will the client get a chance to specify what is his
username/password. He is just getting it from the factory and the factory
has already got a EJBHome object sitting in a hashtable which is what is
returned. Note here that the factory will have specified a UID/Pass while
getting home object for the first time. 

Am I missing something here. Please excuse me if it is something very
trivial but let me know what it is...

- Rajeev

-----Original Message-----
From: Rickard [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 2:46 PM
To: [EMAIL PROTECTED]
Subject: Re: EJBHome Factory - Home Object Caching


Rajeev Dave wrote:

> I assume that security is not taken into account in this discussion.
> What if there is a security constraint on Home interface which declares
> that only principal with Role 'X' can access the methods of the interface.


Then those checks will be performed when those methods are invoked.

The problem you outline does not exist.


/Rickard


--
Rickard �berg
Author of "Mastering RMI"
Chief Architect, TheServerSide.com
   The Middleware Company - We Build Experts!

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to