Hi,

You still need to define which "security role" can use a bean.  And then use 
an attribute <role-link> to map the bean's needed security role to the 
deployment EJB server's security role.

Looks like you need to do some settings in the application.xml file and the 
principals.xml file (add <role-link> attribute...).

Anybody would like to contribute some examples for us!

Regards,
Tom MAK


>From: "Enrique Wallace" <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: RE: initial context help
>Date: Tue, 18 Jul 2000 23:23:21 GMT
>
>>I think I remember somebody said that you should use
>>(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
>>
>
>Thanks for the quick response!  This worked!  I get further along now 
>before
>getting another error.  Now I'm doing this:
>
>Hashtable h = new Hashtable();
>h.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
>h.put(Context.PROVIDER_URL,"ormi://localhost/app");
>h.put(Context.SECURITY_PRINCIPAL,"admin");
>h.put(Context.SECURITY_CREDENTIALS,"123")
>Context jndiContext = new InitialContext(h);
>Object obj = jndiContext.lookup("CabinBean");
>CabinHome home = (CabinHome) javax.rmi.PortableRemoteObject.narrow(obj,
>CabinHome.class)
>Cabin cabin_1 = home.create(1);
>
>but when it comes to the create(), I get this error message:
>
>com.evermind.server.rmi.OrionRemoteException: admin is not allowed to call
>the CabinBean.create(...) method, check your security settings.
>        at EntityHomeWrapper1.create(EntityHomeWrapper1.java:340)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at com.evermind.server.rmi.ba.run(JAX)
>        at com.evermind.server.rmi.a8.gu(JAX)
>        at com.evermind.server.rmi.a8.run(JAX)
>        at com.evermind.util.e.run(JAX)
>at connection to localhost/127.0.0.1 as admin
>        at com.evermind.server.rmi.a8.invokeMethod(JAX)
>        at com.evermind.server.rmi.a_.invoke(JAX)
>        at com.evermind.server.rmi.a0.invoke(JAX)
>        at __Proxy0.create(Unknown Source)
>        at com.titan.cabin.Client_1.main(Client_1.java:27)
>
>Where/how do I set my security settings?  I had to activate the admin user
>in principals.xml myself.
>
>Thanks for your help.
>
>ekw
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Reply via email to